[net.unix] Odd use for /dev/null

ado@elsie.UUCP (Arthur David Olson) (12/24/84)

In a case where I wanted to do a
	grep expression `find * -name "*.c" -print`
the list of file names generated by the "find" command was too long to
be used as an argument list to grep.  Easy enough, said I to myself--I'll
	find * -name "*.c" -exec grep expression {} \;
which may be slower and which will get the job done.  Alas, while this did print
the lines of interest, it failed to prepend these lines with the names of the
files they were taken from (as the first command had done).

"/dev/null" to the rescue:
	find * -name "*.c" -exec grep expression {} /dev/null \;

(Of course, there may be other ways that you like better of getting the same
thing done on a 4.1bsd system.  If so, tap that 'r' key (making sure not to
tap the 'f' key by mistake) and let me have your insights.)
--
UNIX is an AT&T Bell Laboratories trademark.
--
	..decvax!seismo!elsie!ado			(301) 496-5688
	DEC, VAX and Elsie are Digital Equipment and Borden trademarks