Xref: utzoo comp.unix.wizards:9288 comp.unix.questions:7547 Path: utzoo!utgpu!water!watmath!watdragon!watsol!tbray From: tbray@watsol.waterloo.edu (Tim Bray) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: grep replacement Summary: I stand by my position Keywords: grep, nm, unix consistency Message-ID: <7349@watdragon.waterloo.edu> Date: 14 Jun 88 13:34:55 GMT References: <7882@alice.UUCP> <5630@umn-cs.cs.umn.edu> <6866@elroy.Jpl.Nasa.Gov> <2978@ihlpe.ATT.COM> <1463@laidbak.UUCP> <4524@vdsvax.steinmetz.ge.com> <2274@isis.UUCP> <7207@watdragon.waterloo.edu> <239@eutrc3.UUCP> Sender: daemon@watdragon.waterloo.edu Reply-To: tbray@watsol.waterloo.edu (Tim Bray) Organization: U. of Waterloo, Ontario Lines: 17 >In article <7207@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