我目前有一个类似的脚本
./a | ./b | ./c
我想修改它,以便如果a,b或c中的任何一个退出并带有错误代码我打印错误消息并停止而不是向前输出错误的输出.
最简单/最干净的方法是什么?
error-handling shell pipe
error-handling ×1
pipe ×1
shell ×1