2 ms·
Debian dash is useful to keep my scripts honest. Busybox actually takes dash, and then sprinkles a few bash/korn features back onto it (notibly, not arrays).
by chasil 4y ago
Debian dash is useful to keep my scripts honest.
Busybox actually takes dash, and then sprinkles a few bash/korn features back onto it (notibly, not arrays).
If you want a lot of people to use your scripts, getting them working in dash can help a great deal.
The POSIX mode in bash exists because bash itself predates POSIX by nearly a decade.
- rwmj 4y agoWhat does "keep my scripts honest" even mean? Just use bash and don't make everyone else boil your ocean. It's like saying you'll never use any Linux feature except those strictly defined by POSIX.1. Why would you do that?
- chasil 4y agoAndroid uses mksh. If I write a script that uses read -p to present a prompt, it will fail on Android because it means coprocess on mksh. The fundamental reality is that GPL does not run on iOS or Android (in userland). If you want to run scripts on those platforms (and they are ENORMOUS), then you cannot use bashisms. Full stop.
- kazinator 4y agoNote: BusyBox has two shell implementations in it, selected at compile time.