Hacker News new | ask | show | jobs
by gkya 3087 days 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.
1 comments

like which?

I'm hard pressed to think of a modern unix that doesn't include bash by default. Solaris maybe?

All the current BSD systems, and some GNU/Linux distributions. I'd guess that illumos does not have bash installed by default, too.
everything 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.
I'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.