[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Eliminating bash scripts?

Recently I noticed some bug reports asking that scripts be
rewritten to run on (POSIX) sh. �These weren't the familiar
(and completely justified) complaints about bashisms in scripts
shebanged #!/bin/sh.�These were requests to rewrite #!/bin/bash
scripts as #!/bin/sh�scripts. �Why do this? �The following reasons
were advanced.

* The package then has fewer dependencies
* ... and can then be installed on a system without bash.
* When /bin/sh is dash, the script will run faster
* ... and will run on a shell which is smaller and thus less buggy
* ... and more secure
* ... and, after all, standard, whereas bash is not,
* ... and consequently better understood by programmers,
* ... and portable, whereas bash is not.
* Indeed, dash is the future whereas bash is history.
* If sed has to be used, that OK, its regexps are better than
bash's extended globs.

I wonder what Debian folk think about these claims. �

Should�we be aiming to eliminate all bash scripts from Debian?

Are there real-world Debian systems that are "minimal"�enough
to have trouble running bash, but not so minimal�that busybox
has to be used?

One thing I would like to point out immediately is that a bash
script�will not necessarily run faster if it has to be rewritten
to run on sh. �This is especially true if ${//}s are replaced by�
pipes to sed.
Thomas Hood

Reply to: