Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/17/84; site elsie.UUCP
Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!sdcrdcf!hplabs!hao!seismo!umcp-cs!cvl!elsie!ado
From: ado@elsie.UUCP (Arthur David Olson)
Newsgroups: net.unix
Subject: Odd use for /dev/null
Message-ID: <4108@elsie.UUCP>
Date: Mon, 24-Dec-84 14:08:01 EST
Article-I.D.: elsie.4108
Posted: Mon Dec 24 14:08:01 1984
Date-Received: Thu, 27-Dec-84 03:06:29 EST
Organization: NIH-LEC, Bethesda, MD
Lines: 20

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