3 ms·
Also, bash on Mac is shitty. I've run into problems with it before (can't remember exactly what it was) so we've reversed it: our shell scripts are written in z
by raffraffraff 6y ago
Also, bash on Mac is shitty. I've run into problems with it before (can't remember exactly what it was) so we've reversed it: our shell scripts are written in zsh, and we just ensure that zsh installed everywhere.
- dataflow 6y agoOh yeah that too, that's another whole can of worms I forgot to bring up, thanks for mentioning it.
- jcynix 6y agoBesides 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; }