Skip to content

Instantly share code, notes, and snippets.

@prabhakaran9397
Created August 5, 2017 12:23
Show Gist options
  • Save prabhakaran9397/f80ca3b2f310d88195c79e617f2eef89 to your computer and use it in GitHub Desktop.
Save prabhakaran9397/f80ca3b2f310d88195c79e617f2eef89 to your computer and use it in GitHub Desktop.

>

Redirection: stdout to file

command > file.txt

2>

Redirection: stderr to file

command 2> file.txt

&>

Redirection: stdout and stdout to file

command &> file.txt

|

Piping: stdout to stdin

command1 | command2

2> >()

Piping: stderr to stdin

command1 2> >(command2)

|&

Piping: stdout and stdout to stdin

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