User Tools

Site Tools



The “|” pipe metacharacter enables you to run a set of chained processes.

To understand lets do an example creating a temporal file called tmp.txt and counting how many lines there are in the file.

ls /usr/bin > tmp.txt
wc -l tmp.txt

The same can be written

ls /usr/bin | wc -l

without creating an intermediate file.

wiki/pipe.txt · Last modified: 2017/12/05 22:53 (external edit)