What does “|&” mean in bash?

前端 未结 2 517
故里飘歌
故里飘歌 2021-01-31 01:39

For example

echo \"aaa\" |& cat 

What does |& mean here?

Is there a website recommended to look up those? Since m

2条回答
  •  执笔经年
    2021-01-31 02:27

    From man 1 bash, section Pipelines:

    If |& is used, command's standard error, in addition to its standard output, is connected to command2's standard input through the pipe

    So it is just like pipe operator |, but piping both stdout and stderr.

提交回复
热议问题