Last active
May 27, 2024 20:40
-
-
Save A/bce19a0b6d8ac441bb57 to your computer and use it in GitHub Desktop.
Bash cheatsheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# strout & stderr | |
## print stdout & stderr to file | |
cmd &> file | |
## pipe stdout & stderr | |
cmd &| less | |
# profile | |
## profile cmd | |
time cmd | |
## profile pipe | |
time cmd | cmd2 | cmd3 | … | |
# parallel | |
## -k - save order | |
## -X - emulate xargs | |
## the {} is replaced with each line read from standard input | |
cat file | parallel -k echo {} append_string | |
ls | parallel -X mv {} destdir | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment