ABSTRACT

The shell's greatest strength is that it can be used to combine programs to create pipelines that can handle large volumes of data. This chapter shows how to do that, and how to repeat commands to process as many files as needed automatically. One approach to combine programs is to redirect the output from a shell command to a file, instead of printing it, then use the output file as the input file to another shell command. An alternative way to combine programs is the pipe, a way to link the output of one command to the input of another without intermediate files. A loop is a way to repeat a set of commands for each item in a list. By the end of the chapter a learner will know how to redirect output, combine commands using the pipe, and repeat commands using a for loop.