For most POSIX-wannabe platforms, STDIN is handle 0, STDOUT is handle 1, STDERR is handle 2.
- "command >foo" is the same as "command 1>foo".
- "command 2>foo" redirects errors, not output.
- "command 2>&1" ties error output to wherever plain output is going.
Some command shells have different syntax for these, and some are picky about the order ("command foo 2>&1 1>foo" may act differently).
--
[ e d @ h a l l e y . c c ]