Suppose I want to capture the return code of
(exit 56)
If I use set -e or a zerr handler, I can no longer do:
(exit 56)
ret=$?
If I use (exit 56) || true to avoid set -e, the return code would become zero and I can no longer get it.
So how do I get the return code?


bash): Which is more idiomatic in a bash script: `|| true` or `|| :`?