autoconf
[Top][All Lists]
Advanced

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

Re: bash bug in $()


From: Bruce Korb
Subject: Re: bash bug in $()
Date: Wed, 28 Dec 2005 12:24:18 -0800
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

Eric Blake wrote:
Dan Jacobson uncovered what I believe is a bash bug:
http://article.gmane.org/gmane.comp.shells.bash.bugs/8574

See my arguments as to why I think this is a violation of
POSIX rules:
http://article.gmane.org/gmane.comp.shells.bash.bugs/8575

Although the Shell Substitutions portion of the manual
already recommends using `foo` instead of $(foo),
it may be worth adding to that section to also document
that bash 3.0 (I haven't verified whether bash 3.1 has
fixed the bug), zsh (as of 4.2.6), and ksh (5.2.14) all
have a bug in parsing command substitutions with an

"pdksh", I presume?  David Korn's ksh works fine.
Meanwhile, rather than use context sensitive coding techniques,
always enclose the case patterns in full parenthesis pairs.
I don't know about ancient shells, but it seems to work fine
on every shell that accepts $().  Why should we care in
autoconf anyway, though?  Are we not still constrained to
pre-1977 Bourne shell syntax?  :)  Cheers - Bruce




reply via email to

[Prev in Thread] Current Thread [Next in Thread]