grep replacement
Tim Bray
tbray at watsol.waterloo.edu
Tue Jun 14 23:34:55 AEST 1988
>In article <7207 at watdragon.waterloo.edu> I wrote:
>}Grep should, where reasonable, not be bound by the notion of a 'line'.
...
>}The source is scattered inconveniently. The obvious thing to do is:
>}grep -l _memcpy *.o
>}That this often will not work is irritating.
At least a dozen people have sent me alternate ways of doing this, the
most obvious using 'nm'. Look, I KNOW ABOUT NM! But you're missing the
point - suppose the item in the .o files was another type of string, e.g.
an error message.
The point is: There are some files. One or more may contain a string in
which I am interested. grep -l is a tool which is supposed to tell me whether
one or more files contain a string. The fact that it refuses to do so for
a class of magic files is a gratuitous violation of the unix paradigm.
Tim Bray, New Oxford English Dictionary Project, U of Waterloo
More information about the Comp.unix.questions
mailing list