![]() |
|
|
|
|
|||||||
| 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 |
| redirecting STDOUT & STDERR | jshinaman | Shell Programming and Scripting | 9 | 06-21-2007 09:04 PM |
| precedence of stderr and stdout | new2ss | Shell Programming and Scripting | 1 | 06-08-2006 08:03 PM |
| How to use tee with stdout and stderr? | siegfried | Shell Programming and Scripting | 1 | 11-17-2005 11:07 PM |
| STDOUT and STDERR going to a system log | longyie904 | Shell Programming and Scripting | 1 | 09-11-2002 08:42 PM |
| Redirect stdout and stderr | zcurtis | Shell Programming and Scripting | 8 | 09-02-2002 03:13 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
combined stdout & stderr
Hello Everyone!
I’m trying to combine output for standard output and for possible standard error to the log file. I was trying to use tee command, but it turned out if error occurred error output will be send to the screen only and will not be redirected with tee command to the log file. Anyone knows how to make log file to record all possible output including stderr? Many thanks in advance. |
| Forum Sponsor | ||
|
|
|
|||
|
Thank you Perderabo for the reply. Seems to me both 2>&1 and >& redirect stderr to file and work fine in C shell, however the problem is that no stdout send to terminal – all output redirected to log file. I would like both outputs to be displayed on the terminal, and both of them redirected to log file ( including errors) at same time. Something like tee command which splits output and allow me to see output on the screen and have it in the log file simultaneously. But the problem with tee, that it can handle stdout only and cannot handle stderr.
If I misunderstood your suggestion, please explain it again. Thanks, |
|
|||
|
Thank you for the reply.
Nop, unfortunately it does not work, zazzybob. Does C Shell understand 3>&1 1>&2 2>&3? I’m getting “Ambiguous output redirect”. And I’m getting the same error message while I was trying different combinations of >& and tee… which means to me C shell does not want to see anything after >&. Or I’m able to create log file with stderr in it, but getting nothing to terminal window. I could not imagine it would be so tricky… |
|||
| Google The UNIX and Linux Forums |