Skip to content

Instantly share code, notes, and snippets.

@apinstein
Created October 12, 2011 16:34
Show Gist options
  • Save apinstein/1281740 to your computer and use it in GitHub Desktop.
Save apinstein/1281740 to your computer and use it in GitHub Desktop.
Redirecting STDOUT and STDERR for complex shell commands
(echo 'this is stdout' && this_is_stderr)
(echo 'this is stdout' && this_is_stderr) 1> /dev/null
(echo 'this is stdout' && this_is_stderr) 2> /dev/null
(echo 'this is stdout' && this_is_stderr) > /dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment