[ale] changing dash to bash in ubuntu

Pat Regan thehead at patshead.com
Sat Feb 19 08:39:15 EST 2011


On Fri, 18 Feb 2011 21:46:47 -0500
James Sumners <james.sumners at gmail.com> wrote:

> It changes the link of /bin/sh to point to /bin/dash instead of
> /bin/bash. It does not modify users's shell preferences. The problem
> is that they claim dash to be a POSIX shell, but when people report
> bugs[1] in dash they get written off as "not a POSIX bug" when in fact
> they are. So various scripts that reference `#!/bin/sh` instead of
> `#!/bin/bash` are likely to fail because the developer assumed sh
> would point to bash.

Using for `sh` and assuming that `bash` syntax will work is just
asking for trouble.  

> [1] -- https://bugs.launchpad.net/ubuntu/+source/dash/+bug/141481

If it is true that `dash` isn't fully (or at least mostly) compatible
with `sh` then I would certainly call that a bug.  I wouldn't expect
too many people to consider it a serious bug, though.  Most people I
know take advantage of enough bashisms to make `sh` useless to them.

This thread piqued my curiosity a bit with regard to `dash`.  I'm
guessing the biggest reason for the switch is memory footprint.  With
my default settings `bash` uses almost ten times more memory.  If I
pass `bash` a `--norc --noprofile` it is still bigger by almost four
times.

Pat


More information about the Ale mailing list