grep on *.o

Sjoerd Mullender sjoerd at cs.vu.nl
Wed Jun 15 02:14:31 AEST 1988


In article <16082 at brl-adm.ARPA> ted%nmsu.csnet at relay.cs.net writes:
    From: Tim Bray <tbray at watsol.waterloo.edu>
        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 at cs.vu.nl
When this doesn't work try sending via uunet.uu.net or mcvax.uucp.



More information about the Comp.unix.wizards mailing list