grep replacement

Guy Harris guy at gorodish.Sun.COM
Thu Jun 9 09:17:30 AEST 1988


> 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."



More information about the Comp.unix.wizards mailing list