[Top][All Lists]

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

Re: document another sed portability problem

From: Paul Eggert
Subject: Re: document another sed portability problem
Date: Mon, 24 Jul 2006 12:57:32 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

2006-07-24  Paul Eggert  <address@hidden>

        * doc/autoconf.texi (Limitations of Usual Tools): Warn about
        sed stripping leading white space from text.  From Bruno

Thanks for mentioning that.  I installed the following
slightly-different patch.

--- autoconf.texi       24 Jul 2006 19:35:50 -0000      1.1064
+++ autoconf.texi       24 Jul 2006 19:55:45 -0000      1.1065
@@ -9838,7 +9838,7 @@ m4_foreach([myvar], [[foo], [bar, baz]],
 @defmac m4_foreach_w (@var{var}, @var{list}, @var{expression})
-Loop over the whitespace-separated list @var{list}, assigning each value
+Loop over the white-space-separated list @var{list}, assigning each value
 to @var{var}, and expand @var{expression}.
 The deprecated macro @code{AC_FOREACH} is an alias of
@@ -13671,6 +13671,23 @@ Also note that Posix requires that the @
 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
address@hidden/usr/ucb/sed}) strip leading white space from the text of
address@hidden, @samp{c}, and @samp{i} commands.  Prepend a backslash to
+work around this incompatibility with Posix:
+$ @kbd{echo flushleft | sed -e 'a\}
address@hidden   indented'}
+$ @kbd{echo foo | sed -e 'a\}
address@hidden   indented'}
+   indented
address@hidden example
 @item @command{sed} (@samp{t})
 @c ---------------------------
 @prindex @command{sed} (@samp{t})

reply via email to

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