Library next up previous contents
Next: Pipes and the GRToolbox Up: Combining Modules Previous: Combining Modules

General Remarks on Pipes

The tools, that all perform only a single operation can be combined to perfom complex operations on the data. This feature is realized with the operating systems pipe mechanism. In general, two programs, that are connected through a pipe, communicate over standard in and the standard output. The first porgrams output us taken as the second programs input. Mostly the pipe command is used when the output of a program shell be formatted or a special information should be extracted from any program output


        ls -al | more

Often the contents of the directory is too long to fit a single screen. As a result, the first lines of the directory would vanish at the top of the screen. By using the more command, the output is stopped, whenever the sceen is full.

        ps -al | grep jens

When checking the running processes of a system one is often interested in processes that belong to a certain person or those of a special program. The data of all other processes can be surpressed by the grep option. Only the line which contains the given word will be printed out.

Jens Trapp
Wed Jun 12 20:34:13 MET DST 1996