![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| redirect output to a file name | csecnarf | UNIX for Dummies Questions & Answers | 7 | 06-16-2008 12:45 AM |
| redirect output to log file | kalyanraj | Shell Programming and Scripting | 2 | 06-06-2007 09:40 PM |
| Redirect output to a file | jimmyc | UNIX for Dummies Questions & Answers | 11 | 01-31-2007 08:34 AM |
| Redirect time output | cbeech | UNIX for Dummies Questions & Answers | 2 | 03-24-2006 05:36 PM |
| redirect output to file? | slackware | Shell Programming and Scripting | 1 | 09-11-2003 11:57 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
hello
can some one please help me to redirect the output of a command to both std output and a file. this is little urgent. sridhar |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Use the 'tee' command:
Code:
/usr/bin/generate_stdout | tee -a /filename/to/append/sdtout/to.txt | ./my_command |
|
#3
|
|||
|
|||
|
I'm not sure which unix you are using, but if you have the 'tee' command installed, you can use that.
Code:
# echo hello | tee outfile hello Code:
# cat outfile hello Code:
# echo world | tee -a outfile Code:
# cat outfile hello world |
|||
| Google The UNIX and Linux Forums |