1.3 Programs Are Designed to Work TogetherAs pointed out by Kernighan and Pike in their classic book, The UNIX Programming Environment , there are a number of principles that distinguish the UNIX environment. One key concept is that programs are tools. And like all good tools, they should be specific in function, but usable for many different purposes. In order for programs to become general-purpose tools, they must be data-independent. This means three things:
Programs that can be used in this way are often called filters .
One of the most important consequences of
these guidelines is that programs can be strung together in "pipelines" in
which the output of one
program is used as the input of another.
A vertical bar ( For example, you can pipe the output of a search program to another program that sorts the output, and then pipe the result to the printer program or redirect it to a file ( 13.1 ) . - |
|