Dash as default shell

Jakub Jelinek jakub at redhat.com
Fri Oct 3 23:12:12 UTC 2014


On Fri, Oct 03, 2014 at 06:14:05PM -0400, Rahul Sundaram wrote:
> On Fri, Oct 3, 2014 at 9:04 AM, Garry T. Williams <gtwilliams at gmail.com>
> wrote:
> 
> >
> >     $ (checkbashisms -f -p $(grep -rlE '^#! ?/bin/(env )?sh' /usr/bin) )
> > 2>&1 >/dev/null|grep 'possible bashism'|awk '{print $4}'|sort -u|wc -l
> >     113
> >     $
> >
> > Many of these trigger multiple warnings from checkbashisms.  The total
> > here was 717.  (Fedora 20, KDE.)
> >
> 
> Those numbers are fairly misleading if you look a bit closer.   Each
> individual script has to be run through dash to confirm that it isn't a
> false warning.  If it truly uses bash specific syntax, then there is a bug
> in the script  and it should be changed to use !/usr/bin/bash (quicker) as
> opposed to !/bin/bash or fixed to remove bash specific syntax (more
> portable).  Regardless of whether we are switching the default system
> shell, any shell script that uses bash syntax should be fixed to use
> !/usr/bin/bash.  A lot of this work has already been done by Debian/Ubuntu.

But why?  Seriously, bash has lots of nice extensions, are you going in this
quest to stop using extensions going to suggest that we get rid of GNU C
library extensions usages in the distro programs next, or GCC extensions,
what else?  Several people are using the term bashism as something negative,
I'm not convinced it should be something negative just because Ubuntu
decided to use a less featured shell by default.

	Jakub


More information about the devel mailing list