Redirection and Pipes
reading
We will loosely follow the Software Carpentry Pipes and Filters lesson from The Unix Shell
Let’s work through that lesson together…
Summary
We learned the following commands:
wc
: count the number of lines, words, and characters in a filecat
: print the contents of a file to the terminalless
: a pager that outputs the contents of a file one screen-full at a timesort
: sort the input datahead
: output the first 10 (or specified number of) lines of a filetail
: output the last 10 (or specified number of) lines of a file
We also learned:
>
redirect the output to a file>>
append the output to a file|
pass the output of one command to the input of the next