In the last episode (Aug 18), Dan Langille said:
> Why is this message not being suppressed?
> 
> $ tar -czf test.tgz / 2>&1 > /dev/null
> tar: Removing leading `/' from member names

What you did was dup fd1 onto fd2, then redirect fd1 to /dev/null:

        fd1 -> stdout        fd2 -> stderr
2>&1
        fd1 -> stdout        fd2 -> stdout
>/dev/null
        fd1 -> /dev/null     fd2 -> stdout

Swap the two redirects, so you redirect fd1 to /dev/null, then dup it
onto fd2:

        fd1 -> stdout        fd2 -> stderr
>/dev/null
        fd1 -> /dev/null     fd2 -> stdout
2>&1
        fd1 -> /dev/null     fd2 -> /dev/null

-- 
        Dan Nelson
        [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to