4 ms·
Targeting POSIX as much as possible is really important if you don't want to force Bash on people, especially with open-source public code. Many OSes don't hav
by gkya 9y ago
Targeting POSIX as much as possible is really important if you don't want to force Bash on people, especially with open-source public code. Many OSes don't have Bash in the default install, but many just assume that bash is available on all the target systems.
- Aloha 9y agolike which? I'm hard pressed to think of a modern unix that doesn't include bash by default. Solaris maybe?
- nisa 9y agoeverything embedded - OpenWRT/LEDE uses busybox with ash - Android uses mksh? that only supports a subset of bash features. Every Debian/Ubuntu has ash as /bin/sh that only supports POSIX.
- Aloha 9y agoI'd argue that writing scripts for an embedded target for a regular server/workstation target are fundamentally different problems - almost anything I'd write for those platforms would be targeted for them - not for general purpose unix. Portability is only desirable, if you need portability - otherwise it frequently adds complexity for little return benefit.
- gkya 9y agoAll the current BSD systems, and some GNU/Linux distributions. I'd guess that illumos does not have bash installed by default, too.