grep replacement
Wietse Venema
wswietse at eutrc3.UUCP
Sat Jun 11 06:34:23 AEST 1988
In article <7207 at watdragon.waterloo.edu> tbray at watsol.waterloo.edu (Tim Bray) writes:
}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
nm -op *.o | grep memcpy
will work just fine, both with bsd and att unix.
Wietse
--
uucp: mcvax!eutrc3!wswietse | Eindhoven University of Technology
bitnet: wswietse at heithe5 | Dept. of Mathematics and Computer Science
surf: tuerc5::wswietse | Eindhoven, The Netherlands.
More information about the Comp.unix.questions
mailing list