Re: Dash as default shell

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

 



Hi

On Fri, Oct 3, 2014 at 9:04 AM, Garry T. Williams <gtwilliams@xxxxxxxxx> 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
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux