running a simple command line tool

Avi Greenbury lists at avi.co
Thu Feb 23 19:08:26 UTC 2012


Johnny Rosenberg wrote:
> > A few releases of Debian (and so Ubuntu) ago, it was agreed
> > that /bin/sh would instead be a link to dash, which is a good deal
> > smaller than bash.
> 
> I wonder why they did that. Why not just include sh and use it as is?
> If someone want to use dash, include that too. How hard can it be to
> type ”#! /bin/dash”?
> Is sh so extremely big that there is a point to not include it in the
> distribution?

Even if /bin/sh was the stripped-down posix shell it's supposed to be,
it'd still only be a stripped-down posix shell and unable to perform
any bash-specific features. 

The argument with where /bin/sh goes is that if you're explicitly
asking for /bin/sh (as the test script we're talking about does) you
can only reasonably be expecting sh, so it can point to anything that
provides the totality of what sh does, which includes dash.

The only scripts that break are where someone's done something stupid
like asking for one interpreter and then coding for another.

-- 
Avi.





More information about the ubuntu-users mailing list