Re: portability of positional parameters after $9?

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

 



Hello,

On Wed, Oct 19, 2005 at 02:36:22PM -0700, Paul Eggert wrote:
> It's not a myth.  The 7th edition shell behaved that way; it reported
> an error if given "${10}".  Solaris 10 /bin/sh still acts that way:

attached please find an attempt to document this.
OK to commit?

Stepan
2005-10-20  Stepan Kasal  <kasal@xxxxxx>

	* doc/autoconf.texi (Shell Substitutions}: Document that ${10} is
	not portable; thanks to Paul Eggert and Alexandre.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.930
diff -u -r1.930 autoconf.texi
--- doc/autoconf.texi	19 Oct 2005 22:35:51 -0000	1.930
+++ doc/autoconf.texi	20 Oct 2005 06:29:33 -0000
@@ -6701,7 +6701,7 @@
 your code, rather, require from the user to run the macro with a
 correct current language, and check it with @code{AC_LANG_ASSERT}.
 And anyway, that may help the user understand she is running a Fortran
-macro while expecting a result about her Fortran 77 compiler...
+macro while expecting a result about her Fortran 77 compiler@dots{}
 @end defmac
 
 
@@ -10328,6 +10328,19 @@
 esac
 @end example
 
+
+@item $@{10@}, etc.
+
+The 10th, 11th, @dots{} positional parameters can be accessed only after
+a @code{shift}.  The 7th edition shell reported an error if given @code{$@{10@}};
+Solaris 10 /bin/sh still acts that way:
+
+@example
+$ @kbd{set 1 2 3 4 5 6 7 8 9 10}
+$ @kbd{echo $@{10@}}
+bad substitution
+@end example
+
 @item $@{@var{var}:-@var{value}@}
 @c Info cannot handle `:' in index entries.
 @c @cindex $@{@var{var}:-@var{value}@}
@@ -15812,7 +15825,7 @@
 
 In addition to the change of syntax, the philosphy has changed too:
 while emphasis was put on speed at the expense of accuracy, today's
-Autoconf promotes accuracy of the testing framework at, ahem..., the
+Autoconf promotes accuracy of the testing framework at, ahem@dots{}, the
 expense of speed.
 
 
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux