|
|
|
|
|
by jolmg
204 days ago
|
|
Sorry, I should probably think more widely, but I was just considering Linux distros. > /bin is the "standard" location for bash on a subset of Linux distributions Considering "location" such that it includes /bin symlinks, that would be nearly all distros, I would think... > What's more, bash isn't a standard shell. De facto and specifically among Linux distros, it is. It's probably an underestimate that 95% of all Linux distro installations have it preinstalled. |
|
Bash has to be explicitly installed on OpenBSD, FreeBSD, NetBSD (I think, haven't used it in a while) and probably a bunch of others. And in all of those cases (that I know of) it doesn't end up in /bin/bash once installed.
The default bash shipped on macs is so abhorrently ancient that it would be strictly better if it didn't exist because it would reduce the number of people who think bash scripts I write are broken (they're not broken, they just inevitably depend on some bash 4+ feature). Moreover, hardcoding /bin/bash as your shebang in this case will prevent anyone from remediating this problem by installing a non-ancient bash because the old one in /bin/bash will still get used.