[Top][All Lists]

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

Re: automake results on OpenBSD 4.0

From: Eric Blake
Subject: Re: automake results on OpenBSD 4.0
Date: Wed, 23 Jan 2008 20:27:18 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071031 Thunderbird/ Mnenhy/

Hash: SHA1

[shifting this conversation to autoconf-patches; see
for the thread]

According to Ralf Wildenhues on 1/23/2008 3:03 PM:
| Hi Eric,
| * Eric Blake wrote on Wed, Jan 23, 2008 at 06:34:10PM CET:
|> I'm not sure if grep -a is portable (POSIX doesn't require it),
| AIX grep has no -a.
|> so is the following patch appropriate (and should we also mention
|> this in the autoconf manual)?
| FWIW, as a general (hand-waving) rule, I would rather use POSIX as base
| from which to document deviations, than BSD or GNU features.  That way
| the Autoconf manual doesn't end up documenting all extensions as such.

Agreed.  However, the bit about BSD grep behaving differently based on
whether input is seekable may be useful to more than this automake test,
so I'd like to commit this, if others agree.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -

>From a803dd80b30ec5758c3e1656296b411d990a591b Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Wed, 23 Jan 2008 20:24:47 -0700
Subject: [PATCH] * doc/autoconf.texi (Limitations of Usual Tools) <grep>: 
 BSD behavior on binary input.

Signed-off-by: Eric Blake <address@hidden>
 ChangeLog         |    5 +++++
 doc/autoconf.texi |   14 ++++++++++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d42be11..68673b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-23  Eric Blake  <address@hidden>
+       * doc/autoconf.texi (Limitations of Usual Tools) <grep>: Document
+       BSD behavior on binary input.
 2008-01-23  Ralf Wildenhues  <address@hidden>
        * doc/autoconf.texi (Particular Programs): Do not mention the
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 78628e5..556df41 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -14957,6 +14957,20 @@ Similarly, the following escape sequences should also 
be avoided:
 @samp{\<}, @samp{\>}, @samp{\+}, @samp{\?}, @samp{\`}, @samp{\'},
 @samp{\B}, @samp{\b}, @samp{\S}, @samp{\s}, @samp{\W}, and @samp{\w}.
+Posix does not specify behavior of binary files.  An example where this
+matters is using @acronym{BSD} @command{grep} to search for text
+embedded among @acronym{ANSI} escape sequences for colored output to
+terminals @command{grep} (where @samp{\033[m} is the sequence to restore
+normal output):
+$ @kbd{printf 'esc\033[mape\n' > sample}
+$ @kbd{grep . sample}
+Binary file sample matches
+$ @kbd{cat file | grep .}
address@hidden example
 @item @command{join}
 @c -----------------

reply via email to

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