Comment Comment by polyrand In Bash 4.4+ you can use: shopt -s inherit_errexit 2>/dev/null || true To make subprocesses inherit the errexit flag. parent polyrand 6 years ago