4 ms·
Besides that bash has its problems with array variables. Unless I switch to one of the "real" scripting languages, I use zsh too and start my scripts with if
by jcynix 6y ago
Besides that bash has its problems with array variables. Unless I switch to one of the "real" scripting languages, I use zsh too and start my scripts with
if [[ -n "$BASH" ]] ; then
echo $0: use zsh, not bash
exit 1
fi
Earlier on I used the more compact
[[ -n "$BASH" ]] && { echo $0: use zsh, not bash; exit 1 }
But bash chokes on that with a syntax error
- Izkata 6y agoThe syntax error is on a required semicolon. Put one after the "exit 1": [[ -n "$BASH" ]] && { echo $0: use zsh, not bash; exit 1; }