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

Re: bug report dispute resolution request



On Thu, Dec 14, 2000 at 08:37:18AM +1100, herbert wrote:
> On Wed, Dec 13, 2000 at 09:22:38PM +0000, Ian Jackson wrote:
> > 
> > Having said that, I think the SuS doesn't completely support Herbert's
> > view.  Just at the end of the section on command expansion we see:

Upon reading the POSIX rationale, I'm now completely convinced that it
is the intention of the authors of the POSIX document to allow ash's
behaviour.

To quote the rationale in the draft:

 There is a minor portability concern with the new syntax.  The example
 $((2+2)) could have been intended to mean a command substitution of a
 utility named 2+2 in a subshell.  The developers of POSIX.2 consider this
 to be obscure and isolated to some KornShell scripts [because $( )
 command substitution existed previously only in the KornShell].  The text
 on Command Substitution has been changed to require that the $( and ( be
 separate tokens if this usage is needed.

 An example such as

       echo $((echo hi);(echo there))

 should not be misinterpreted by the shell as arithmetic because attempts
 to balance the parentheses pairs would indicate that they are subshells.   1
 However, as indicated by 3.1.1, a conforming application must separate     1
 two adjacent parentheses with white space to indicate nested subshells.    1

Despite the qualification in the first sentence of the second paragraph
(which BTW is not binding since this is the rationale), it is clear that
the intention is to allow such behaviour as the use of the word must in the
second sentence shows.
-- 
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



Reply to: