1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
ERR status=1 ERR status=7 or: no trap if: no trap not: no trap pipe ok: no trap ERR status=1 ERR status=4 ERR status=1 assign status=1 trap -- 'echo "ERR status=$?"' ERR removed first inside=1 in subshell: reset then exit [status 1]