Bash pipe: get the exit status of previous process in pipeline

后端 未结 0 1381
既然无缘
既然无缘 2021-01-17 03:41

I am writing a logger that capture the output of a script, and handle that output differently if the previous program fail or succeed:

program1 | logger.sh


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题