上QQ阅读APP看书,第一时间看更新
Getting ready
The input is usually fed into a command through stdin or arguments. The output is sent to stdout or stderr. When we combine multiple commands, we usually supply input via stdin and generate output to stdout.
In this context, the commands are called filters. We connect each filter using pipes, sympolized by the piping operator (|), like this:
$ cmd1 | cmd2 | cmd3
Here, we combine three commands. The output of cmd1 goes to cmd2, the output of cmd2 goes to cmd3, and the final output (which comes out of cmd3) will be displayed on the monitor, or directed to a file.