[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

saving output

I want 2 save the output of my c program after running it and later send it to a cd.how can i save the output?
0
shilpi84
Asked:
shilpi84
1 Solution
 
brettmjohnsonCommented:
You can redirect the output to a file using stdout redirection:

myprogram > aFile

If you need to see the output on the console AND capture it to a file, use the 'tee' command:

myprogram | tee aFile



0
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi shilpi84,

Note that you'll have to write to stdout.  You can NOT use the terminal I/O routines.

Good Luck!
Kent
0
 
furqanchandioCommented:
Hi

if u r runnnig windows

run the console window (dos window) in full screen mode

press print screen  ( the button to the right of Function keys)

now open notepad
paste it ( Ctrl + V ) in notepad and save it
0
 
coolguy_iiitCommented:
Which operating system are u using?

If Linux use
          > ./a.out filename > outputfile
          > cat outputfile
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now