grep replacement

Tim Bray tbray at watsol.waterloo.edu
Sun Jun 5 11:18:28 AEST 1988


5 Jun 88 01:18:28 GMT
Sender: daemon at watdragon.waterloo.edu
Reply-To: tbray at watsol.waterloo.edu (Tim Bray)
Organization: New OED Project, U. of Waterloo, Ontario
Lines: 11
Xref: dciem comp.unix.wizards:8154 comp.unix.questions:6789
Summary: grep -l should always work

Grep should, where reasonable, not be bound by the notion of a 'line'.
As a concrete expression of this, the useful grep -l (prints the names of
the files that contain the string) should work on any kind of file.  More
than one existing 'grep -l' will fail, for example, to tell you which of a 
bunch of .o files contain a given string.  Scenario - you're trying to
link 55 .o's together to build a program you don't know that well.  You're
on berklix.  ld sez: "undefined: _memcpy".  You say: "who's doing that?".
The source is scattered inconveniently.  The obvious thing to do is: 
grep -l _memcpy *.o
That this often will not work is irritating.
Tim Bray, New Oxford English Dictionary Project, U of Waterloo



More information about the Comp.unix.wizards mailing list