Return an exit code without closing shell
The answer to the question title (not in the body as other answers have addressed) is: Return an exit code without closing shell (exit 33) If you need to have -e active and still avoid exiting the shell with a non-zero exit code, then do: (exit 33) && true The true command is never executed … Read more