Xref: utzoo comp.unix.wizards:9295 comp.unix.questions:7549 Path: utzoo!utgpu!water!watmath!clyde!att!mtunx!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!oliveb!sun!gorodish!guy From: guy@gorodish.Sun.COM (Guy Harris) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: grep replacement Keywords: Consistency Message-ID: <55868@sun.uucp> Date: 8 Jun 88 23:17:30 GMT References: <7882@alice.UUCP> <5630@umn-cs.cs.umn.edu> <6866@elroy.Jpl.Nasa.Gov> <238@iconsys.UUCP> Sender: news@sun.uucp Lines: 23 > No, the obvious thing to do is: > > nm -o _memcpy *.o "Obvious" under which version of UNIX? From the 4.3BSD manual: -o Prepend file or archive element name to each output line rather than only once. The SunOS manual page says the same thing. From the S5R3 manual: -o Print the value and size of a symbol in octal instead of decimal. With the 4.3BSD version you can do nm -o *.o | egrep _memcpy and get the result you want. For any version of "nm" that I know of, you can do the "egrep" trick mentioned in another posting; you may have to use a flag such as "-p" with the S5 version to get "easily parsable, terse output."