Re:Bash functions are better than I thought
by jude- on Sunday October 31, 2021 @08:36PM
(#29061901)
Bash is readily available everywhere, though. Is there a widely used OS that cannot run bash, but can run BusyBox ash or dash?
Re:Bash functions are better than I thought
by chasil on Monday November 01, 2021 @03:40PM
(#29071919)
Bash 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.
Re:Bash functions are better than I thought
by jude- on Tuesday November 09, 2021 @02:17PM
(#29166107)
But, 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.
Re:Bash functions are better than I thought
by gkfasdfasdf on Monday November 01, 2021 @10:12AM
(#29066802)
> 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?
Re:Bash functions are better than I thought
by chasil on Monday November 01, 2021 @03:44PM
(#29071985)
Bash 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.
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.