Subject: Re: Suggestion: keep binary data out of /etc
To: proprietor - Foo Bar And Grill <greywolf@starwolf.com>
From: R. C. Dowdeswell <elric@mabelode.imrryr.org>
List: current-users
Date: 02/09/1999 21:36:05
On 918621849 seconds since the Beginning of the UNIX epoch
proprietor - Foo Bar And Grill wrote:
>
>I think the thing here is that he doesn't need to know the position,
>just that the pattern exists, and the context in which it exists.
>I use grep like this all the time, although admittedly I'm using it
>on the output of strings.  You can't really search the output of
>something such as, say, 'hexdump -c', because of its formatting.
>grep is about the only useful tool for looking for patterns on streaming
>output.  sed is far too unwieldy for such a task.
>
>I must admit I don't quite grok for what he's searching, but I do think
>that there's something to being able to grep through files, i.e.
>
>	grep foo *.o | grep -v bar
>
>main.o: ~r}iv0LMfoo@$#039c @(#) bar.c
>main.o: _h)@#$foo:  cannot open bar file %s
>
>This would not work on output such as:
>
>main.o: "foo" found.
>
>Is this any clearer?
>
>
>				--*greywolf;
>--
>Graduated from the Yoda Academy of Speech did I
>

I was under the impression that the effect would only be in evidence when
the output was directed to a tty, which is a bit different.  Typically if
I do something like:

$ grep foo *.o | grep -v bar

I'll pipe it to more, otherwise it'll screw up my xterm.  But if you pipe
it to more, then it isn't outputting to a tty, and therefore will not work
differently than it currently does.

 == Roland Dowdeswell
 == http://www.imrryr.org/~elric/