[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: foo=${foo='}'}
From: |
Akim Demaille |
Subject: |
FYI: foo=${foo='}'} |
Date: |
10 Nov 2000 15:48:35 +0100 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* doc/autoconf.texi (Shell Substitutions): Some information about
Solaris' sh handling of ``foo=${foo='}'}'' collected by Alexandre,
reported by David Taylor.
2000-11-10 Akim Demaille <address@hidden>
Index: doc/autoconf.texi
===================================================================
RCS file: /cvs/autoconf/doc/autoconf.texi,v
retrieving revision 1.379
diff -u -u -r1.379 autoconf.texi
--- doc/autoconf.texi 2000/11/10 14:44:30 1.379
+++ doc/autoconf.texi 2000/11/10 14:54:35
@@ -5150,6 +5150,33 @@
Old @sc{bsd} shells, including the Ultrix @code{sh}, don't accept the
colon for any shell substitution, and complain and die.
address@hidden address@hidden@var{var}='@var{value}'@}
address@hidden address@hidden@var{var}='@var{value}'@}
+Solaris' @command{/bin/sh} has a frightening bug in its understanding
+this. Imagine you need set a variable to a string containing @address@hidden
+This @address@hidden character got Solaris' @command{/bin/sh} confused when
+the affected variable was already set. This bug can be exercised by
+running:
+
address@hidden
+% /bin/sh
+$ unset foo
+$ address@hidden'@}'@}
+$ echo $foo
address@hidden
+$ address@hidden'@}' # no error; this hints to what the bug is
+$ echo $foo
address@hidden
+$ address@hidden'@}'@}
+$ echo $foo
address@hidden@}
+ ^ ugh!
address@hidden example
+
+It seems that @address@hidden is considered to match @address@hidden, even
though
+it is enclosed in single quotes. The problem doesn't happen using
+double quotes.
+
@item $(@var{commands})
@cindex $(@var{commands})
This construct is meant to replace @address@hidden; they can be
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: foo=${foo='}'},
Akim Demaille <=