Named Pipes in a *nix shell
Most of those familiar with *nix are familiar with piping data “|” to other programs. At the very least, you probably have piped the result of many commands into grep (ls | grep x).
But did you know you can pipe output into a named pipe in a terminal/shell?
The simplest way to show how named pipes work is with an example. Suppose we’ve created pipe as shown above. In one virtual console1, type:ls -l > pipe1
and in another type:cat < pipe
Voila! The output of the command run on the first console shows up on the second console. Note that the order in which you run the commands doesn’t matter.