Set -e behavior with pipelines: exit decision unclear
Goal We want a Bash script that terminates immediately when any component of a pipeline fails, without relying on pipefail . Current Constraints Using Bash 5.2, set -e is enabled. In a pipeline such as cmd1 | cmd2 | cmd3 , only the exit status of cmd3 is normally considered. If cmd2 fails but cmd3 succeeds, the script continues. Uncertainty Documentation not