Hacker News
new
past
comments
ask
show
jobs
points
by
tzot
12 hours ago
|
comments
by
archargelod
12 hours ago
|
next
[-]
I'm just too used to how parsing works in Zsh. For bash and sh, there is indeed should be a semicolon.
reply
by
xorcist
11 hours ago
|
prev
|
[-]
In this specific case, echo can't fail to there's no need for any of that:
[ -z "$1" ] && echo "fail" >&2 && exit 1
reply
by
layer8
11 hours ago
|
parent
|
[-]
Echo will fail here when stderr is closed. For example when the caller of the script pipes stderr to another command and that command exits.
reply