I want to pipe all the output (to stdout and stderr) from a program
to another program (such as cat). How to do this?
"p1 2>&1 | p2" doesn't work
c*****t 发帖数: 1879
2
csh or tcsh:
p1 |& p2
sh:
p1 2>& 1 | p2
【在 m*****e 的大作中提到】 : I want to pipe all the output (to stdout and stderr) from a program : to another program (such as cat). How to do this? : "p1 2>&1 | p2" doesn't work