Path: utzoo!attcan!uunet!mcvax!botter!star.cs.vu.nl!sjoerd From: sjoerd@cs.vu.nl (Sjoerd Mullender) Newsgroups: comp.unix.wizards Subject: Re: grep on *.o Message-ID: <806@sjoerd.cs.vu.nl> Date: 14 Jun 88 16:14:31 GMT References: <16082@brl-adm.ARPA> Reply-To: sjoerd@cs.vu.nl (Sjoerd Mullender) Organization: VU Informatica, Amsterdam Lines: 26 In article <16082@brl-adm.ARPA> ted%nmsu.csnet@relay.cs.net writes: From: Tim Bray 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 True, grep only works on readable files, the next most obvious thing to do is produce ascii output, then grep: nm $i | egrep '_memcpy|:' Since we are on berklix, there is an even better way: nm -o *.o | grep _memcpy The -o flag tells nm to prepend the file name to each line. This even works on Version 7. -- Sjoerd Mullender sjoerd@cs.vu.nl When this doesn't work try sending via uunet.uu.net or mcvax.uucp.