June 2005
Beginner
480 pages
10h 31m
English
Pipes in Unix and MS-DOS/Windows are used for connecting different processes together so that the output of one process becomes the input of the next process. Consider the following set of commands, which would almost work in Unix (if you change the dir to ls) or MS-DOS:
dir > outfile sort outfile > newfile more newfile
The output of dir is collected in outfile. Then sort is used to sort outfile, and the output from sort is stored in newfile. Then more shows the contents of newfile a screenful at a time.
Pipes allow you to perform that same sequence, but without outfile and newfile, like this:
dir | sort | more
The output of dir is given to sort, which then sorts the data. The output from sort is then given to more for page-at-a-time ...
Read now
Unlock full access