>Ok - can someone explain the following:
>
>[EMAIL PROTECTED]:/tmp$ ls
>[EMAIL PROTECTED]:/tmp$ rm abc
>rm: cannot remove `abc': No such file or directory
>[EMAIL PROTECTED]:/tmp$ rm abc 2>err
>[EMAIL PROTECTED]:/tmp$ cat err
>rm: cannot remove `abc': No such file or directory
>[EMAIL PROTECTED]:/tmp$ rm err
>[EMAIL PROTECTED]:/tmp$ rm abc 2>&1 > err
>rm: cannot remove `abc': No such file or directory
>[EMAIL PROTECTED]:/tmp$ rm abc 2>&1 > /dev/null
>rm: cannot remove `abc': No such file or directory
>
>Why can't I silently discard the output of rm?
>Am I missing something subtle?
>Something obvious?
>A vital brain part?

The ordering is significant...

"rm notafile > /dev/null 2>&1" will work
"rm notafile 2>&1 > /dev/null" will not..

- Chris


**********************************************************************
This electronic mail is intended for the use of the addressee only. If you 
receive this electronic mail in error, please delete it immediately. It may 
also contain confidential information. You may not use or disclose any 
confidential information.

The statements or views expressed in this electronic mail are those of the 
individual sender and are not those of AAP Information Services Pty Ltd (AAP). 
These statements are not binding on AAP, except where the sender expressly and 
with authority, states them to be.

AAP is unable to review the contents of all of the electronic mail on its 
system. To the extent permitted by law, AAP disclaims all liability for any 
loss or damage caused by the contents of this electronic mail.
**********************************************************************

Reply via email to