by thankthunk · 8y ago · 0 comments
It's a bit too late for that. Bash is pretty much the de facto default shell for linux. Telling people not to use bash scripts is like telling web devs not to use javascript or OS devs not to use C.
It may change in the future, but bash is so entrenched, it's going to take an extraordinary use case for people to move from bash.
https://linux.die.net/man/1/checkbashisms https://mywiki.wooledge.org/Bashism https://wiki.ubuntu.com/DashAsBinSh https://en.wiktionary.org/wiki/bashism
Oh, yes it is. Every important distribution uses bash as the default.
You don't know your history. Exactly such a move has already happened once, a decade ago. And it was a success.
* https://lists.debian.org/debian-release/2007/07/msg00027.htm...
* http://initscripts-ng.alioth.debian.org/soc2006-bootsystem/b...
* https://wiki.debian.org/BootProcessSpeedup#Using_a_faster_sy...
Some Linux distro don't ship it either (void, alpine IIRC).
And, most of the time, bash is used because people don't know any better, see e.g. https://github.com/OpenRA/OpenRA/pull/8405/files
I love finding and removing all the GNU/Linux-ism in my bash code when I move it from a dev host to my personal laptop. macOS coreutils don't have GNU longopts, surprise!
The installed binaries will have their names prefixed with `g`; e.g. `gdate` instead of `date`.
If something you want isn't part of coreutils, you can often install it directly; e.g. `brew install gawk` or the weirdly-named `brew install gnu-sed` (which names its installed binary `gsed`... go figure.)
Wow, this comparison is totally whack. Javascript and C are both standardized and the former is the only option when using a web browser.
It's never too late. We managed to get people off of ANSI C and there's a similar amount of difference between ANSI* C and C89 as there is between bash and sh.
* correction: pre-ANSI