The Pipe
What this is. A pipe connects the output of one command to the input of the next.
`
command1 | command2
`
Nothing touches the disk. The first command's results flow straight into the second, which is why pipelines are fast even on large inputs.
✦ The philosophy this comes from
Unix was built on a deliberate bet: rather than one program that does everything, make many small programs that each do one thing, and give them a standard way to be joined. grep does not sort. sort does not count. wc does not search. None of them needed to, because the pipe lets you assemble the one you need out of the ones that exist. Every command you learn multiplies with every other command you know.
Mark this lesson complete
Signed in, your progress follows you to every device.