[arch-general] dash as system /bin/sh? (Was: dash as default shell?)

Eli Schwartz eschwartz at archlinux.org
Wed Jun 17 22:25:56 UTC 2020

On 6/17/20 3:54 PM, Kusoneko wrote:
> It has the cost that everyone who uses scripts that use bashisms will
> inevitably have issues, furthermore, considering Arch only supports
> x86_64, I've yet to see systems under that architecture have low
> amounts of memory and 6MB of disk storage is incredibly small. The
> real question here is "Is it worth forcing people to remove bashisms
> or specify that the script is meant for bash in their scripts
> (whichever ones don't do so already) for a speed improvement on a
> shell scripts that work with dash?" Note that some upstreams will
> likely not care, and maintainers will have to patch the scripts
> manually in that case.

Debian/Ubuntu has extensive prior art in this matter.

It was very important and resulted in very noticeable speed improvements
on x86_64 systems with lots of memory and disk storage, because pid 1
used to be shellscripts and doing it in bash is slow and gets even
slower the more you fork new scripts. :)

Also Linux isn't everything :) and there are plenty of systems where
bash is not installed by default. e.g. the *BSDs.

Also also, bash is not installed on systems such as alpine linux.

So any script assuming /bin/sh is bash, is broken on lots of systems.


This is not actually a problem, I've used dash as my /bin/sh for years
and haven't once encountered a broken script.

Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-general/attachments/20200617/555ead93/attachment.sig>

More information about the arch-general mailing list