Thank you very much for a great post!
I found following still doesn't exit with the setting suggested in the post.
set -euo pipefail
shopt -s inherit_errexit nullglob
cat -n <(cat notFound) <(echo Hello)
echo "shouldn't be executed: $?"
I think it is because the process substitution (<(cat notFound)) creates a sub-shell but it doesn't involve an assignment.
The example you mentioned (the command substitution without an assignment) can be avoided with an assignment to a dummy variable but I can't come up with a good workaround...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you very much for a great post!
I found following still doesn't exit with the setting suggested in the post.
I think it is because the process substitution (
<(cat notFound)
) creates a sub-shell but it doesn't involve an assignment.The example you mentioned (the command substitution without an assignment) can be avoided with an assignment to a dummy variable but I can't come up with a good workaround...