On Tue, Oct 27, 2009 at 16:48, Martin Gregorie <martin@xxxxxxxxxxxx> wrote: > However, the "app & >x.txt " command definitely doesn't do what was > expected. In the interest of providing an SSCE I wrote a test program > that sends recognisable output to stdout and stderr: There shouldn't be a space.... My test: mohag@mohagpc:~$ (echo stdout; echo stderr >&2) stdout stderr mohag@mohagpc:~$ (echo stdout; echo stderr >&2) > /dev/null stderr mohag@mohagpc:~$ (echo stdout; echo stderr >&2) 2> /dev/null stdout mohag@mohagpc:~$ (echo stdout; echo stderr >&2) &> /dev/null mohag@mohagpc:~$ See http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html Not sure if it works in plain Bourne.... dash doesn't work as expected: mohag@mohagpc:~$ dash $ (echo stdout; echo stderr >&2) &> /dev/null $ stdout stderr [1] + Done (echo stdout; echo stderr 1>&2) $ zsh works: mohag@mohagpc:~$ zsh mohagpc% (echo stdout; echo stderr >&2) &> /dev/null mohagpc% (echo stdout; echo stderr >&2) > /dev/null stderr mohagpc% (echo stdout; echo stderr >&2) 2> /dev/null stdout Gert