I've tested these with:

GNU bash, version 2.05b.0(1) on Linux 2.6.8.1 and Mac OS X 10.3.8
tcsh 6.12.00 (Astron) 2002-07-23 on Linux 2.6.8.1 and Mac OS X 10.3.8


cmd stderr destination
console
file1
(Note: /dev/null for any file
makes that data disappear.)
file2 != file1
stdin of next cmd in pipeline
(Note: Using 'tee file' for
cmd2 makes its stdin go
to console and file
simultaneously).
cmd stdout destination
console
cmd
bash: cmd 2>file1
tcsh: (cmd > /dev/tty) >& file1
N/A: See left
bash: cmd 2>&1 1>/dev/tty | cmd2
bash: (cmd > /dev/tty) 2>&1 | cmd2
tcsh: (cmd > /dev/tty) |& cmd2
file1
cmd > file1
cmd >& file1
bash: cmd 1>file1 2>file2
bash: (cmd > file1) >& file2
tcsh: (cmd > file1) >& file2
bash: cmd 2>&1 1>file1 | cmd2
bash: (cmd > file1) 2>&1 | cmd2
tcsh: (cmd > file1) |& cmd2
stdin of next
cmd in pipeline
cmd | cmd2
bash: cmd 2>file1 | cmd2
tcsh: ???
N/A: See left
bash: cmd 2>&1 | cmd2
tcsh: cmd |& cmd2
stderr
(useful to make
echo in a shell
script print to
stderr instead of
stdout)
bash: cmd 1>&2
tcsh: ???




This is not intended to be an exhaustive list of every possible way to do it.  However, if you know any of these things:
Then I would be glad to hear from you at:

andy_fingerhut <a with a circle around it> alum [period] wustl [period] edu