First page Back Continue Last page Overview Graphics
Pipelines
A pipe redirects standard output of one command to the standard input of the next one
Explain these pipelines
- tac /var/log/messages | less (or “more”)
- who | grep jeremy
- cat /var/log/messages | tail
Can include multiple commands, various input/output redirections, etc.
- uniq < file.txt | sort | uniq
- sort -n -k 3 -t : < /etc/passwd | cut -f 1 -d : | xargs echo
“Filters” are commands that take stdin, do something with it, and output the data on stdout.
Can span multiple lines for readability
Notes: