Re: Several reasons why debian should not use bash for /bin/sh
Hi,
>>"Chris" == Chris Ulrich <cdulrich@ucdavis.edu> writes:
Chris> -- 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.
Chris> -- End of excerpt from (Alex Yukhimets) --
Chris> I don't think posix compliance is worth running bash.
Umm. Standards compliance is pretty important in my book. And
so far, people have managed to survive with bash. And memoy and disk
space are only getting cheaper.
Chris> I'm not sure how un-compliant pdksh is, but I'd guess that it
Chris> is pretty close to a full posix shell.
What are you basing this guess on?
Chris> Also, since posix shell is basically ksh, using pdksh as a
Chris> "posix" shell seems more natural.
Umm, really? I don't see Korn mentioned in my POSIX
standard. I'll try and look harder.
Chris> I'm not sure posix compliance is a good enough goal because
Chris> there are lots of non-posix compliant /bin/sh's out there.
Huh? There is no point in being law abiding because people out
there break the law? What kinda logic is this?
Chris> I don't think it's *good* to have a non-compliant shell, but I
Chris> think the cost of using bash as /bin/sh is higher than the
Chris> cost of non-compliance.
I beg to disagree.
Chris> Also, I've seen situations where "posix compliant" shells have
Chris> different behavior (eg 'test -f file1 file2').
Which one agrees with the standard? You know, POSIX compliance
is not just a string of words. There is a standard. If the shells in
question diffre, one should look at the standard and see which one is
non-conformant.
Chris> The only real standard is that /bin/sh has a minimum of
Chris> traditional bourne shell compatibility. Dependency on more is
Chris> asking for trouble
Wrong. The only real standard is POSIX. The "moinimum of
traditional bourne shell compatibility" is esssentially a meanigless
phase. In a sense, POSIX codifies that minimum standard.
Chris> As for writing scripts without bashisms; if you send me a
Chris> script with bashisms, I'll send you a bourne shell script that
Chris> does the exact same thing without bash (or ksh)isms. chris
Wonderful. Now just go and convert the bashisms you
find, and submit patches as bug reports.
manoj
--
... The important thing isn't so much *what* you want to ban; it's
the fact that you participate in the banning process. That's what
democracy is all about. Dave Barry, What To Ban On Video, _Bad
Habits_
Manoj Srivastava <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: