Redirect errors and output messages to /dev/null

Should work with scripting shells such as sh, ksh, and bash:

$ command > /dev/null 2>&1
$ ./script.sh > /dev/null 2>&1
$ ./example.pl > /dev/null 2>&1

or 

$ command &>/dev/null
$ job arg1 arg2 &>/dev/null
$ /path/to/script arg1 &>/dev/null

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post