Skip to content

Instantly share code, notes, and snippets.

@gbarreiro
Created December 6, 2020 20:39
Show Gist options
  • Save gbarreiro/ce853672b7dc04286e3e254252d6a138 to your computer and use it in GitHub Desktop.
Save gbarreiro/ce853672b7dc04286e3e254252d6a138 to your computer and use it in GitHub Desktop.
Bash cheatsheet: pipes
a | b # pipe: inject a command output into b command input
a > file.txt # save output of command a into file.txt (overwrite)
a >> file.txt # save output of command a into file.txt (append)
echo "Hello!" | xargs echo # injects the output of the first command as an argument of the second command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment