Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

C script to write output of a program to file

Featured Replies

Posted

Hey everyone,

I'm looking to learn how to write a c script I can run that will write the output of a program to another file. Do I just write a small c program that calls exec() and I can get the variables from there? I'm having a hard time searching for some kind of tutorial on what to do, can anyone enlighten me/point me in the right direction?

EDIT: So I now understand how to write a shell script to get the output of a program, this was apparently to easy to think of to start with... I'm now looking into how to get specific variables from the output/specific lines, say an output line starts with foo:, can I just get the output of this line?

EDIT II: I now understand the power of awk and a lot more about shell scripting, I've figured out what I needed after finally finding some tutorials on the matter.

Thanks,

Justin

Edited by Kruse

Maybe you could share the answers with the rest of the forum so others can learn if they are seeking the same answers?

HR,

Ghandi

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.