[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Several reasons why debian should not use bash for /bin/sh



-- On Jul 29, 10:38pm, (Alex Yukhimets) wrote:
> Subject: Re: Several reasons why debian should not use bash for /bin/sh
> >   I can think of many reasons why bash should not be used as /bin/sh:
> 
> I would be glad to make some other strict POSIX-compliant /bin/sh instead of
> bash, but I am afraid we don't have a candidate. I don't think ash is good
> enough for the job. And I don't have enough information about pdksh.
> 
> Making our scripts not to use "bashism" is a big problem though.
> 
> Alex Y.
-- End of excerpt from (Alex Yukhimets) --


  I don't think posix compliance is worth running bash.  I'm not sure
how un-compliant pdksh is, but I'd guess that it is pretty close to a
full posix shell.  Also, since posix shell is basically ksh, using pdksh
as a "posix" shell seems more natural.  I'm not sure posix compliance
is a good enough goal because there are lots of non-posix compliant 
/bin/sh's out there.  I don't think it's *good* to have a non-compliant
shell, but I think the cost of using bash as /bin/sh is higher than the
cost of non-compliance.  Also, I've seen situations where
"posix compliant" shells have different behavior (eg 'test -f file1 file2').
  
  The only real standard is that /bin/sh has a minimum of traditional
bourne shell compatibility.  Dependency on more is asking for trouble

  As for writing scripts without bashisms; if you send me a script with
bashisms, I'll send you a bourne shell script that does the exact same
thing without bash (or ksh)isms.
chris

-- 
 Chris Ulrich        cdulrich@ucdavis.edu        530 754 4355


--  
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: