Hi,

Jeremy Nicoll wrote:
> Why is the "2>&1" part needed?   Wouldn't stderr go to the terminal by
> default.

Goal is to redirect both to /dev/null.

So these would do:

  bin/mailwatcher 2>/dev/null >/dev/null &

  bin/mailwatcher >/dev/null 2>&1 &


But as Michael Milliman pointed out,

  bin/mailwatcher 2>&1 >/dev/null &

redirects only stdout to /dev/null and leaves stderr directed to where
stdout was pointing before.


Have a nice day :)

Thomas

Reply via email to