Subject: Re: Suggestion: keep binary data out of /etc
To: Bill Studenmund <skippy@macro.Stanford.EDU>
From: proprietor - Foo Bar And Grill <>
List: current-users
Date: 02/09/1999 20:44:09
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?

Graduated from the Yoda Academy of Speech did I