Main Page | See live article | Alphabetical index

Pipe (computing)

Pipe ("|" or "¦") is the name of the ASCII character at position 124 (decimal). The pipe character is depicted as either a solid vertical bar or a vertical bar with a break in the middle (broken bar). The character is usually depicted as a broken bar on IBM PC keyboards to distinguish it from other characters.


In the context of Unix and Unix-like operating systems, as well as MS-DOS, a pipe signifies that the output of one program ("stdout") feeds directly as input ("stdin") to another program. Any error messages from the first program ("stderr") are not passed on through the pipe. The Unix shell uses the pipe character ( | ) to join programs together. A sequence of commands joined together by pipes is known as a pipeline. Often filter programs form the constituent programs in a pipeline -- see pipes and filters.

An example of a pipeline, which should print the numbers from 1 to 13:

while : ; do echo ; done | head -n 13 | nl -ba


See pipe for other uses of the word.