Answer the question
In order to leave comments, you need to log in
How to determine if there is an error in a process group (pipeline)?
Hello.
Let's say that in the pipeline: prog1 | prog2 | prog3
an error occurred in prog2.
How to get a return code? Is it a variable $? contains the return code of the last command (prog3 in this case).
In particular, I need to somehow make sure that the commands through the pipeline are executed without errors. After that, the execution of the underlying code will become possible.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question