]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Document sed -e limitation.
authorBruno Haible <bruno@clisp.org>
Fri, 18 Jun 2010 15:05:29 +0000 (09:05 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 18 Jun 2010 15:11:09 +0000 (09:11 -0600)
* doc/autoconf.texi (Limitations of Usual Tools): Mention portability
problem of sed -e option with script fragments.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
doc/autoconf.texi

index 6e3749924dcaec801373ec7d56f4da37dc40288e..52a7bb1be052fa268b48f58c6b0ae27cf968321a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-18  Bruno Haible  <bruno@clisp.org>
+
+       Document sed -e limitation.
+       * doc/autoconf.texi (Limitations of Usual Tools): Mention portability
+       problem of sed -e option with script fragments.
+
 2010-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Document, test, and fix AT_ARG_OPTION, AT_ARG_OPTION_ARG.
index f6eb362a8b3932201a15c760b65725005151f67d..eba61f4963216402ceb68c9bd8e7ecc8ecc3a8b8 100644 (file)
@@ -18237,6 +18237,22 @@ but Posix says that this use of a semicolon has undefined effect if
 should use semicolon only with simple scripts that do not use these
 verbs.
 
+The argument of the @option{-e} option must be a syntactically complete
+script.  GNU @command{sed} allows to pass multiple script fragments,
+each as argument of a separate @option{-e} option, that are then combined,
+with newlines between the fragments.  A future Posix revision may allow
+this as well.  But in Posix:2008, this is not allowed, and the
+@command{sed} programs on Solaris 10, HP-UX 11, and AIX don't allow it
+either:
+
+@example
+$ @kbd{echo a | sed -n -e 'i\}
+@kbd{0'}
+0
+$ @kbd{echo a | sed -n -e 'i\' -e 0}
+Unrecognized command: 0
+@end example
+
 Commands inside @{ @} brackets are further restricted.  Posix says that
 they cannot be preceded by addresses, @samp{!}, or @samp{;}, and that
 each command must be followed immediately by a newline, without any