Trust me, /bin/sh is not a stable, non-moving target. Not even on GNU/Linux. Go further afield and there are a great many quirks.
Even on Linux I've encounted four major flavours of /bin/sh: Dash, Bash, Ash and Msh.
The available variable interpolation syntaxes vary considerably. The only portable way to do most string things tend to use combinations of 'echo' or 'printf' and 'sed', and even those aren't portable without some platform detection. Something as simple as adding the right number of backslashes to a command, for example to quote a command given to SSH, is tricky in shell and quite version dependent.
Bash isn't a non-moving target either; I've had Bash scripts break when moved from one Linux distro to another, due solely to different behaviours of different Bash versions.
Some of the things Autoconf does to workaround /bin/sh differences are quite exciting.
If you consider /bin/sh scripting to include the behaviour of commands run from it, which you probably should, the situation is much worse. Very standard things like 'ls', 'echo', 'cp' vary across platforms in meaningful ways.
In comparison, Perl is much more consistent across platforms and versions. If it does something in one version on any platform, it almost always does exactly the same in any later version on every platform.
You make a really good argument. Especially the external binaries part convinces me that shell is much more on the facetious end of that response spectrum.
I would argue that it is unfair to compare different implementations of shell, though. I think it's fair to compare across versions of bash, for example, but disingenuous to compare, e.g., Dash, Bash, Ash, and Msh. If, for example, Dash is my target, then I should call and install Dash. For this reason, it was probably a poor idea for me to call out /bin/sh, specifically, as custom dictates that this is, in fact, a different program in different environments.
Trust me, /bin/sh is not a stable, non-moving target. Not even on GNU/Linux. Go further afield and there are a great many quirks.
Even on Linux I've encounted four major flavours of /bin/sh: Dash, Bash, Ash and Msh.
The available variable interpolation syntaxes vary considerably. The only portable way to do most string things tend to use combinations of 'echo' or 'printf' and 'sed', and even those aren't portable without some platform detection. Something as simple as adding the right number of backslashes to a command, for example to quote a command given to SSH, is tricky in shell and quite version dependent.
Bash isn't a non-moving target either; I've had Bash scripts break when moved from one Linux distro to another, due solely to different behaviours of different Bash versions.
Some of the things Autoconf does to workaround /bin/sh differences are quite exciting.
If you consider /bin/sh scripting to include the behaviour of commands run from it, which you probably should, the situation is much worse. Very standard things like 'ls', 'echo', 'cp' vary across platforms in meaningful ways.
In comparison, Perl is much more consistent across platforms and versions. If it does something in one version on any platform, it almost always does exactly the same in any later version on every platform.