Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to direct standart output to a file

Status
Not open for further replies.

crasho2001

Technical User
Jun 13, 2002
51
TR
Hi,
I wrote a shell script. This script calls a program in it.
I directed program output to a file.
program > log

But output never goes to log file. I see output on monitor always.

How can I direct this output to a file ?
 
hi,
what is the name of the program? Not all programs write their output to STDOUT.

Some write it to STDERR, some write it directly to /dev/ttyxx.

you can try also directing STDERR....

csh
program >& log

ksh
program > log 2>&1


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top