3 ms·
Bash is not everywhere. There are two very distinct places where Bash is not, that I have found. Bash is not in busybox. It pretends to be, but what is really
by chasil 5y ago
Bash is not everywhere.
There are two very distinct places where Bash is not, that I have found.
Bash is not in busybox. It pretends to be, but what is really there is the Almquist shell, with a bit of syntactic sugar to silence the common complaints.
Bash is also not in Debian's shell (/bin/sh). In that place, there is no tolerance of bashisms.
It is important to know the POSIX shell for these reasons.
- jude- 5y agoBash is readily available everywhere, though. Is there a widely used OS that cannot run bash, but can run BusyBox ash or dash?
- chasil 5y agoBash is not used in Android. The Android userland explicitly avoids any GPL software. The Android system shell is the MirBSD Kornshell (mksh). This is (obviously) a massive platform.
- jude- 5y agoBut, you can nevertheless install bash on Android. That was my ask -- show me a widely-used OS that cannot run bash but can run other similar shells.
- gkfasdfasdf 5y ago> Bash is also not in Debian's shell (/bin/sh). In that place, there is no tolerance of bashisms. When writing a bash script, shouldn't you be setting the shebang to /bin/bash which is available on Debian?
- chasil 5y agoBash is the default interactive shell, but the Almquist shell is the default for /bin/sh, and must be used for all system startup activity. It is otherwise advisable when speed or portability are required.