In case you're not, here are some "Bashisms" that really suck to be without:
* built-in regex support (e.g. `[[ $var =~ ^1\.2\.[34]$ ]]`)
* process substitution (e.g. `diff <(before_command) <(after_command)`) and all sorts of other redirection tricks
* indexed and associative arrays
Some of this can be worked around by shelling off to grep for regular expression matching or awk for arrays, but Bash makes things so much cleaner and maintainable.
And even if you do install it, it still won't work with scripts that specify /bin/bash (which is a lot of them, thanks to sloppy tutorials), since it will be in /usr/local/bin and not /bin.
* http://unix.stackexchange.com/a/250965/5132
* https://debian.org/doc/debian-policy/ch-files.html#s-scripts
* http://manpages.ubuntu.com/manpages/xenial/en/man1/checkbash...
* http://manpages.ubuntu.com/manpages/xenial/en/man1/posh.1.ht...
The answer is, of course, lots of them; as there was a massive project to do exactly this in Debian and Ubuntu some years ago.
When I mentioned embedded systems I primarily thought of Linux/Busybox-based devices, like OpenWRT. While one surely can have bash there, usually base image doesn't contain it.
Same story about the most common Linux-based OS out there: Android. And, while it's no one manually runs shell scripts there, apps quite frequently exec() things, so shell scripting still matters there - a tiny bit. Also, shell scripting is heavily used in firmware upgrades/patches, as well as a glue for the root/unlocking hacks.
If you plan to write a redistributable component or an useful hack for such platforms, you'd best stick with a very limited subset of POSIX.
this should not be construed as an argument in support of /bin/sh.
A few hours ago; and before that, last Wednesday. The latter says:
JdeBP % /bin/bash
zsh: no such file or directory: /bin/bash
JdeBP %
The Z Shell is an add-on here, too. /bin/sh is the Korn shell. No, it's not OpenBSD.AFAIK in POSIX /bin/sh it's not possible to detect if a process that writes into a pipe exits with an error status.
bash has "set -o pipefail" and "$PIPESTATUS" for that.