From 6ca599819cc6ee946798bac15b2f3b6d9a2b8584 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 8 Feb 2007 23:42:46 +0000 Subject: [PATCH] * doc/autoconf.texi (Parentheses): Mention problem with (( in shells. --- ChangeLog | 5 +++++ doc/autoconf.texi | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7e35a9e..07dfd75c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-02-08 Paul Eggert + + * doc/autoconf.texi (Parentheses): Mention problem with (( in + shells. + 2007-02-07 Ralf Wildenhues and Paul Eggert diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 7e47ee7b..557d3666 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -11896,9 +11896,13 @@ for the rationale. @section Parentheses in Shell Scripts @cindex Shell parentheses -Beware of two opening parentheses in a row, as some shell -implementations mishandle them. For example, @samp{pdksh} 5.2.14 -misparses the following code: +Beware of two opening parentheses in a row, as many shell +implementations treat them specially. Posix requires that the command +@samp{((cat))} must behave like @samp{(cat)}, but many shells, including +Bash and the Korn shell, treat @samp{((cat))} as an arithmetic +expression equivalent to @samp{let "cat"}, and may or may not report an +error when they detect that @samp{cat} is not a number. As another +example, @samp{pdksh} 5.2.14 misparses the following code: @example if ((true) || false); then -- 2.11.4.GIT