your_command 2> some_file
This will send all error output to a file named "some_file"
and normal output (from "your_command") to the screen.
Example using C (csh) and Tenex C (tcsh) shells:
( your_command > output_file ) >& error_file
This will send normal output (of "your_command") to a file
named "output_file", and error output (of "your_command")
to a file named "error_file".
As I said before, output redirection is explained in the
man pages. So - depending on the shell you use - try one
/\ \ /| Avi Abrami, Analyst/Programmer, Terayon Comms
/ \ \/ | http://www.terayon.com
>After redirecting standard error and output to a file such as
>2>/dev/null, how do you reassign it back to where it was?
Use another file descriptor, for example:
exec 3>&2 2>/dev/null
Net-Tamer V 1.08X - Test Drive