From: Max Webb, AKA the intermediate Linux newbie, AKA Techno/Bossa Nova fan. In un*x/Gnu Linux, How do I go about suppressing the output of commands, so that although the commands are executed, any results or any related error messages are suppressed? BTW is use Z shell. Thanks in advance. -- Remember: Always think positively. You will prevail.
On Sun, Jun 09, 2002 at 06:57:54PM -0700, Max Webb wrote:
In un*x/Gnu Linux, How do I go about suppressing the output of commands, so that although the commands are executed, any results or any related error messages are suppressed? BTW is use Z shell. Thanks in advance.
yourcommand >/dev/null 2>&1 This says to send standard output to the bitbucket, and to send standard error (2) the same place as standard output (1). If you want to see errors but not regular output, leave off the 2>&1.
Thanks Tara, That did the trick. I new it had something to do with /dev/null, but didn't know the format. I will endeavor to learn more. Thanks again. On Sunday 09 June 2002 07:06 pm, Tara L Andrews wrote:
On Sun, Jun 09, 2002 at 06:57:54PM -0700, Max Webb wrote:
In un*x/Gnu Linux, How do I go about suppressing the output of commands, so that although the commands are executed, any results or any related error messages are suppressed? BTW is use Z shell. Thanks in advance.
yourcommand >/dev/null 2>&1
This says to send standard output to the bitbucket, and to send standard error (2) the same place as standard output (1).
If you want to see errors but not regular output, leave off the 2>&1.
-- Remember: Always think positively. You will prevail.
participants (2)
-
Max Webb
-
Tara L Andrews