GOTCHA in Ubuntu - broken shell

Ben Scott dragonhawk at gmail.com
Sat Sep 29 21:05:05 EDT 2007


On 9/29/07, Tyson Sawyer <tyson at j3.org> wrote:
> If you say '/bin/sh' then you should speak '/bin/sh'.
> If you are speaking '/bin/bash', then you should say, '/bin/bash'.

  It gets ugly in the other direction, too, BTW.  Some people fall the
habit of just putting "#!/bin/bash" at the top of every shell script
they write, even those that do not use bash-specific features.  If
those shell scripts then go to a system which has *a* Bourne-like
shell but not bash, they fail, because bash isn't available, even
though another shell (which would have worked) is.

  And then we can get into extension which are present in multiple
shells (say, bash and zsh) but not a basic, POSIX-compliant,
Bourne-like shell.  What do you do *then*?

  Personally, I think the right thing to do is make bash the de facto
standard on all *nix systems.  We don't need this kind of headache.
But others obviously disagree.  Entropy wins again.  But then, it
always does.

-- Ben


More information about the gnhlug-discuss mailing list