Piping input and output
In general, you can think of each UNIX command (ls, cd, and so on) as an individual program that UNIX executes. For example, if you type ls /etc at thew prompt, UNIX will run the ls program on the /etc directory. Each program requires input (in this example, the contents of a directory or any other information that the program processed) and produces output (i.e., the displayed results).
Frequently, you'll want to run programs in sequence. For example, you could tell UNIX to read your resume and then spell-check it. In doing this, you connect two commands together and have them run in sequence. This process, in which you connect the output of one program to the input of another, is called piping. Depending on what you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access