First page Back Continue Last page Overview Graphics
Pipes
With a pipe ( | ) we can feed the output of a tool as input to another.
- $ ls -la | less
- $ cat <filename>
We can redirect it to a file with the > symbol
- $ ls -la > output
- $ cat output > output.2
Notes:
The pipe embodies the entire philosophy of UNIX “tools” design. Each tool is there to do one task, and do it well (efficiently, reliably). Accomplishing complex tasks is handled by chaining together many tools, that must all be able to belong to a chain of pipes.