0

Normally, if has an exit status not zero, execution will continue:

false
echo 'this will show'

If you use set -e, the shell immediately shall exit:

set -e
false
echo 'this will not show'

I am curious if a variable assignment can have an exit status not zero, that would normally continue. I came up with these, but they cause execution to stop even without set -e:

wh=$$(
xr=${}
readonly zu=2; zu=3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.