1. Pipe's function:
The output of each command in the pipeline is connected via a pipeto the input of the next command. That is, each command reads the previous command's output. Thisconnection is performed before any redirections specified by thecommand.
2. Note: If ‘|&’ is used, the standard error of command1 is connected tocommand2's standard input through the pipe; it is shorthand for2>&1 |. This implicit redirection of the standard error isperformed after any redirections specified by the command.
3. Each command in a pipeline is executed in its own subshell
4.
本文介绍了管道命令的基本功能,即通过管道连接多个命令,使得前一个命令的输出成为后一个命令的输入。特别指出当使用‘|&’时,第一个命令的标准错误会被连接到第二个命令的标准输入。此外还提到每个管道中的命令都在各自的子shell中执行。
1805

被折叠的 条评论
为什么被折叠?



