Dash as default shell

Garry T. Williams gtwilliams at gmail.com
Fri Oct 3 13:04:19 UTC 2014


On 10-2-14 10:01:45 Rahul Sundaram wrote:
> On Thu, Oct 2, 2014 at 9:56 AM, Miroslav Suchý  wrote:
> > On 10/02/2014 04:39 AM, Rahul Sundaram wrote:
> >> Is it worth considering using Dash as the default (non-interactive) shell
> >> in Fedora?
> >
> > Why starting with changing target of /bin/sh?
> >
> > Can we start with smaller step?
> > Like put in Packing Guidelines, that authors and maintainers of
> > non-interactive shell scripts should use
> >   #!/usr/bin/dash
>
> I don't think we need all scripts to do this.  Using sh when you are
> not relying on any bash specific features is just fine.   Arch Linux
> wiki suggests:
>
> $checkbashisms -f -p $(grep -rlE '^#! ?/bin/(env )?sh' /usr/bin)

    $ (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.)

-- 
Garry T. Williams



More information about the devel mailing list