]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* doc/autoconf.texi (Limitations of Usual Tools): Document sed
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 14 Aug 2006 22:51:35 +0000 (22:51 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 14 Aug 2006 22:51:35 +0000 (22:51 +0000)
problems with arg script text that doesn't end in newline, and
with '-e a...'.  Problems reported by Ralf Wildenhues.

ChangeLog
doc/autoconf.texi

index d7eafa450f90eddde1e44070c9753aebcf4f6fab..e880163954cf40d06e7ea45a79da7c1cd492304f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * doc/autoconf.texi (Limitations of Usual Tools): Document sed
+       problems with arg script text that doesn't end in newline, and
+       with '-e a...'.  Problems reported by Ralf Wildenhues.
+
 2006-08-12  Alexandre Julliard  <julliard@winehq.org>  (tiny change)
 
        * lib/autoconf/libs.m4 (AC_PATH_X_DIRECT): Replace another
index 278a8e750daa34947a472f422f348c20ab1bfffe..a0ca35fe073e26989571f323163bd1413f4a49f1 100644 (file)
@@ -13605,8 +13605,10 @@ $ @kbd{echo '1*23*4' | /usr/xpg4/bin/sed 's/\(.\)*/x/g'}
 x
 @end example
 
-The @option{-e} option is portable.
-Some people prefer to use it:
+The @option{-e} option is portable, so long as its argument
+does not begin with @samp{a}, @samp{c}, or @samp{i}
+(as this runs afoul of a Tru64 5.1 bug).
+Some people prefer to use @samp{-e}:
 
 @example
 sed -e '@var{command-1}' \
@@ -13671,18 +13673,26 @@ Also note that Posix requires that the @samp{b}, @samp{t}, @samp{r}, and
 On the other hand, no white space is allowed between @samp{:} and the
 subsequent label name.
 
-Some @command{sed} implementations (e.g., MacOS X 10.4, Solaris 10
+If a sed script is specified on the command line and ends in an
+@samp{a}, @samp{c}, or @samp{i} command, the last line of inserted text
+should be followed by a newline.  Otherwise some @command{sed}
+implementations (e.g., OpenBSD 3.9) do not append a newline to the
+inserted text.
+
+Many @command{sed} implementations (e.g., MacOS X 10.4, OpenBSD 3.9, Solaris 10
 @command{/usr/ucb/sed}) strip leading white space from the text of
 @samp{a}, @samp{c}, and @samp{i} commands.  Prepend a backslash to
 work around this incompatibility with Posix:
 
 @example
-$ @kbd{echo flushleft | sed -e 'a\}
-@kbd{   indented'}
+$ @kbd{echo flushleft | sed 'a\}
+> @kbd{   indented}
+> @kbd{'}
 flushleft
 indented
-$ @kbd{echo foo | sed -e 'a\}
-@kbd{\   indented'}
+$ @kbd{echo foo | sed 'a\}
+> @kbd{\   indented}
+> @kbd{'}
 flushleft
    indented
 @end example