Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!cbmvax!grr From: grr@cbmvax.UUCP (George Robbins) Newsgroups: comp.unix.wizards Subject: Re: recursive grep Message-ID: <7774@cbmvax.UUCP> Date: 29 Aug 89 13:50:10 GMT References: <666@lakart.UUCP> <1641@cbnewsl.ATT.COM> Reply-To: grr@cbmvax.UUCP (George Robbins) Organization: Commodore Technology, West Chester, PA Lines: 26 In article <1641@cbnewsl.ATT.COM> ams@cbnewsl.ATT.COM (andrew.m.shaw,580,) writes: > > In article <666@lakart.UUCP> dg@lakart.UUCP (David Goodenough) writes: > >steve@polyslo.CalPoly.EDU (Steve DeJarnett) sez: > >> williamt@sun.UUCP (William A. Turnbow) writes: > > > > find . -type d -print | awk '{ print "grep string " $0 "/*" }' | sh > > > >But then I use awk for most everything, no matter how ugly :-) > > Since my previous posting may have gotten lost, I resend that I recommend > the following: > > find . -type f -print | xargs fgrep string > > Neat and clean. Iff your system happens to have xargs - many Berkeley derived systems don't, in which case the "find | filter | sh" can stil handle the problem. It may not be as quick, since it does one command per filename, but it's certainly more flexible. -- George Robbins - now working for, uucp: {uunet|pyramid|rutgers}!cbmvax!grr but no way officially representing arpa: cbmvax!grr@uunet.uu.net Commodore, Engineering Department fone: 215-431-9255 (only by moonlite)