LWN.net Logo

Has anyone considered extending dash?

Has anyone considered extending dash?

Posted Aug 7, 2009 18:43 UTC (Fri) by giraffedata (subscriber, #1954)
In reply to: Has anyone considered extending dash? by fbriere
Parent article: A tale of two shells: bash or dash

Any script requiring bash features can always specify #!/bin/bash on its first line.

And pay the price of Bash. The point is that it would be great if we could get the cheapness of Dash from many programs that were written for Bash.

The issue with bashisms is not about people needing specific bash features, but about people not knowing that they are bash-specific.
That's an important issue, but not the one that is the subject of this article. The instant issue with bashisms is that they exist today in scripts that specify #!/bin/sh, and that complicates making /bin/sh = Dash. Making Dash understand some bashisms can't completely solve the problem, but it could ameliorate it considerably.

The bash(1) manpage doesn't state which features are standard and which are not,

It also doesn't state which features are available in which versions of Bash, which makes it hard to write a #!/bin/bash program that works everywhere. And Perl and myriad programming libraries have the same issue. I'm expanding on this point to encourage people who write manuals for such things to consider including that information.


(Log in to post comments)

Has anyone considered extending dash?

Posted Aug 9, 2009 6:18 UTC (Sun) by jlokier (guest, #52227) [Link]

Not only that, but occasionally a new version of Bash will deliberately break something which worked in an older version of Bash. Just like Perl, really, but without the helpful warnings.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds