autoconf-patches
[Top][All Lists]
Advanced

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

[PATCH] doc: document dash bug with positional parameters


From: Eric Blake
Subject: [PATCH] doc: document dash bug with positional parameters
Date: Thu, 5 May 2011 08:31:06 -0600

* doc/autoconf.texi (Shell Substitutions) <${10}>: Document
a pitfall with $10.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog         |    6 ++++++
 doc/autoconf.texi |   12 ++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 14abf51..1fca7bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-05  Eric Blake  <address@hidden>
+
+       doc: document dash bug with positional parameters
+       * doc/autoconf.texi (Shell Substitutions) <${10}>: Document
+       a pitfall with $10.
+
 2011-04-27  Eric Blake  <address@hidden>

        docs: document NetBSD join bug
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index b466e56..7ff693f 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -15846,6 +15846,18 @@ Shell Substitutions
 bad substitution
 @end example

+Conversely, not all shells obey the Posix rule that when braces are
+omitted, multiple digits beyond a @samp{$} imply the single-digit
+positional parameter expansion concatenated with the remaining literal
+digits.  To work around the issue, you must use braces.
+
address@hidden
+$ @kbd{bash -c 'set a b c d e f g h i j; echo $10 address@hidden@}0'}
+a0 a0
+$ @kbd{dash -c 'set a b c d e f g h i j; echo $10 address@hidden@}0'}
+j a0
address@hidden example
+
 @item address@hidden@var{var}:address@hidden@}
 @c Info cannot handle `:' in index entries.
 @ifnotinfo
-- 
1.7.4.4




reply via email to

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