checkbashisms
checkbashisms
Posted Dec 17, 2010 22:10 UTC (Fri) by cmccabe (guest, #60281)In reply to: checkbashisms by alecs1
Parent article: Introducing the "Debian's Automated Code Analysis" (DACA) project
> I sure didn't notice the difference, whatever that might be; but I did
> waste time with dpkg-reconfigure to test this.
You probably didn't notice the difference in thousands of other small optimizations people made, either. But added together, they make a difference.
> I'm pretty sure Bash is not unfixable, it is a damn console, not the
> entire kernel.
I'm pretty sure you've never seen the source code to bash.
Posted Dec 18, 2010 21:07 UTC (Sat)
by epa (subscriber, #39769)
[Link] (8 responses)
Posted Dec 19, 2010 0:18 UTC (Sun)
by foom (subscriber, #14868)
[Link] (6 responses)
Posted Dec 19, 2010 0:48 UTC (Sun)
by dlang (guest, #313)
[Link] (2 responses)
Posted Dec 19, 2010 1:08 UTC (Sun)
by foom (subscriber, #14868)
[Link]
Posted Dec 19, 2010 13:22 UTC (Sun)
by pkern (subscriber, #32883)
[Link]
Posted Dec 22, 2010 12:31 UTC (Wed)
by epa (subscriber, #39769)
[Link] (2 responses)
Fifteen years ago bash might have been seen as bloated.
Posted Dec 25, 2010 5:07 UTC (Sat)
by foom (subscriber, #14868)
[Link] (1 responses)
Posted Dec 31, 2010 11:52 UTC (Fri)
by epa (subscriber, #39769)
[Link]
I think you are probably right though - to keep everybody happy, if you want bash it's best to say what you mean.
Posted Dec 19, 2010 2:58 UTC (Sun)
by MisterIO (guest, #36192)
[Link]
checkbashisms
(Hoping for some answer other than 'because it has always been that way')
checkbashisms
checkbashisms
checkbashisms
That's a valid option of course. However, if it's only a small bit of work you can save a bit of time on every invocation of the script, by using a faster shell than bash as `/bin/sh'.
As long as you intentionally expect bash with its feature set for a script, it's fine to just write `/bin/bash' as your interpreter. This work is supposed to check for the accidental expectation that the POSIX `/bin/sh' has the bash feature set.
checkbashisms
checkbashisms
a separate /bin/minimal_bare_bones_sh for the tiny
number of cases where it is truly needed.
That really isn't an issue any more.
checkbashisms
checkbashisms
checkbashisms
