Is there any reason to use bash over zsh? [closed]

Solution 1:

Two reasons come to mind:

First -- it is available practically everywhere. I have several Linux systems (CentOS 4.x in this case) which do not have zsh installed. Similarly I have to touch ancient systems like Solaris 2.6 and up, HP-UX 10 and up, and similarly creaky versions of AIX. Therefore I pretty much have to use bash on these computers, which I do because I touch dozens, if not hundreds, of individual computers over the course of a month, and in order to get consistency in your interface you end up being stuck using the defaults.

Second -- it is available practically everywhere. This means I can write a bash shell script and be 99% sure that it will work when transferred elsewhere.

Yes, these reasons are superficially the same, but the reasoning behind them is different.

Solution 2:

Bash generally comes with every system, zsh doesn't. I love zsh, but because of this, I use zsh for interactive use, but Bash for all my scripting.

I find this keeps everything simpler, as even when I shopt whatever the bash compatible (setopt SH_WORD_SPLIT ?), I still run into subtle differences.