Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!nih-csl!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: comp.unix.wizards Subject: Re: recursive grep Message-ID: <9135@elsie.UUCP> Date: 28 Aug 89 21:22:25 GMT References: <666@lakart.UUCP> <1641@cbnewsl.ATT.COM> Organization: NIH-LEC, Bethesda, MD Lines: 19 > . . .I recommend the following: > find . -type f -print | xargs fgrep string Using find . -type f -print | xargs fgrep string /dev/null will help ensure that all files are treated consistently. If xargs bunched all but one of your files into its first exec of fgrep, then passed the last file to fgrep, you'd get output such as firstfile: This is a string. secondfile: This is also a string. This is the last string. with the first command above; you'd get output such as firstfile: This is a string. secondfile: This is also a string. thelastfile: This is the last string. with the second command above. -- Gettysburg Address: 266 words. Spencer article bodies, 8/12-18/89: 14439 words. Arthur David Olson ado@alw.nih.gov ADO is a trademark of Ampex.