TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:17836] Fun with bash



On Fri, 19 May 2000, Clay Fandre wrote:

> Dave Sherohman wrote:
> > 
> > Gabe Turner said:
> > > You're using sh... how is that bash scripting? :)
> > 
> > pchan ~$ ls -l `which sh`
> > lrwxrwxrwx    1 root     root            4 Aug 20  1999 /bin/sh -> bash
> 
> But if you use #!/bin/sh in your script, bash will act like the
> traditional sh instead of bash. So there is a difference. (However
> minimal it is.)

That is what it is supposed to do, however it does not do that in my 
experience.  This means that your #!/bin/sh scripts can break on *BSD
which has a real /bin/sh.

Besides, you really need a statically linked /bin/sh, something lacking
from most Linux distros.  With a statically linked /bin/sh, you can boot
with init=/bin/sh to make repairs, if you need to.

-Chris