2 ms·
In this specific case, echo can't fail to there's no need for any of that: [ -z "$1" ] && echo "fail" >&2 && exit 1
by xorcist 3mo ago
In this specific case, echo can't fail to there's no need for any of that:
[ -z "$1" ] && echo "fail" >&2 && exit 1
- layer8 3mo agoEcho will fail here when stderr is closed. For example when the caller of the script pipes stderr to another command and that command exits.