【发布时间】:2019-10-26 11:39:41
【问题描述】:
是否可以有一个命令将 STDOUT 和 STDERR 作为单独的流捕获以用作下一个命令中的参数?
就是一个例子。
# foo outputs to stdout and stderr
# bar recieves in -i and -j streams that could be files but in general they are streams, so it would make sence to pipe to any of this two.
$ foo | bar -i - -j -&2
我可以在 bash 中执行此操作吗?还是在其他外壳中?
【问题讨论】:
标签: shell pipe stdout stdin stderr