Skip to content

Instantly share code, notes, and snippets.

@normoes
Last active October 12, 2018 07:46
Show Gist options
  • Save normoes/1d39f933abebf1996ccff00651d8a5b3 to your computer and use it in GitHub Desktop.
Save normoes/1d39f933abebf1996ccff00651d8a5b3 to your computer and use it in GitHub Desktop.
redirection of stdout and stderr

source

Redirect stdout to one file and stderr to another file:

command > out 2>error

Redirect stderr to stdout (&1), and then redirect stdout to a file:

command >out 2>&1

Redirect both to a file:

command &> out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment