Dash as default shell

Rahul Sundaram metherid at gmail.com
Fri Oct 3 22:14:05 UTC 2014


Hi

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.


Rahul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/devel/attachments/20141003/27f8fb47/attachment.html>


More information about the devel mailing list