next up previous contents
Next: The Shell (csh, tcsh, Up: Commands Previous: Wild card characters (*,   Contents

Pipelines ($\vert$)

The output of one command can be fed directly as input to another (this is an extremely useful feature not available in VMS). A set of commands strung together in this way is called a pipeline, and the symbol for the input/output connection is a vertical bar ( $\vert$ ), called a pipe. On most keyboards, the pipe is typed with shift-backslash.

malama% ls -l | grep drwx

This example will list only the subdirectories in your present directory, by checking the detailed output listing for the key bits which indicate a directory. You can make a pipeline several commands long, a feature you will find very useful as your knowledge of UNIX becomes greater. You can even pipe the output of a command to lpr if you wish to print it.

Check out the manuals ``SUNOS User's Guide: Getting Started'' and ``SUNOS Guide: Doing More'' for more detail on commands and examples of their uses.

truein



h.stilmack@jach.hawaii.edu