Extract STDERR and redirect STDOUT to /dev/null with bash
Posted on October 19th, 2008 by linux
I always keep forgetting this bash syntax redirection. This is because of my short memory and also because I do not use it often. In many cases we need to remove a STDERR from the command output and keep only STDOUT. On the other hand there are times that we want to see STDERR and remove STDOUT. Here is how to do it:
$ BASH-COMMAND 2>&1 > /dev/null
Filed under: Administration, Bash, Linux, Scripting