On Thu, Jun 06, 2002 at 05:04:57PM -0700, The Gyzmo wrote:
: Why do you have to put '2>&1' after '/dev/null' when
: piping something to /dev/null, like this:?
: 
: [command] > /dev/null 2>&1

You've got it backwards.

[command] 2>&1 > /dev/null

2 == stderr
1 == stdout

You redir stderr into stdout, then shoot the whole thing into /dev/null.

You don't HAVE to do this, just when you want to discard any output
from a command.

-- 
Jason Costomiris <><           |  Technologist, geek, human.
jcostom {at} jasons {dot} org  |  http://www.jasons.org/ 
          Quidquid latine dictum sit, altum viditur.
                    My account, My opinions.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to