The shell uses a pipe to connect standard output of one command directly to standard input of another command. A pipe (sometimes referred to as a pipeline) has the same effect as redirecting standard output of one command to a file and then using that file as standard input to another command. A pipe does away with separate commands and the intermediate file. The symbol for a pipe is a vertical bar (|). The syntax of a command line using a pipe is
command_a [arguments] | command_b [arguments]
This command line uses a pipe to generate the same result as the following group of command lines:
command_a [arguments] > temp command_b [arguments] < temp rm temp
In the preceding sequence of commands, the first line redirects standard output ...