3 ms·
Since it's bash-specific, I think people should use zsh instead. No need to quote variables as by default, splitting is not done. And you get access to arrays a
by vbernat 7y ago
Since it's bash-specific, I think people should use zsh instead. No need to quote variables as by default, splitting is not done. And you get access to arrays and associative arrays.
- codys 7y agoBash has arrays. x=(1 2) echo "${x[0]}" And associative arrays declare -A x x[hi]=20 x[bye]=30 echo "${x[hi]}" for i in "${!x[@]}"; do echo "k: $i, v: ${x[$i]}" done
- dahart 7y agoI love zsh’s variable & filename expansion features! But I switched to bash after using zsh for a long time because zsh is less standard, not installed by default, can be a bit of a pain when doing lots of ssh work or on machines I don’t control. Bash is always there. Zsh is also really heavy, or it was last time I checked. Larger binary & slower startup time than bash, and lots of features I don’t use. Modules, calendar, tcp, ftp client ... that’s a lot of stuff in the shell that is arguably better put into separate executables.