Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!usc!polyslo!steve From: steve@polyslo.CalPoly.EDU (Steve DeJarnett) Newsgroups: comp.unix.wizards Subject: Re: recursive grep Message-ID: <13710@polyslo.CalPoly.EDU> Date: 22 Aug 89 21:04:43 GMT References: <122979@sun.Eng.Sun.COM> Reply-To: steve@polyslo.CalPoly.EDU (Steve DeJarnett) Organization: Lab Rat Rumpus Room -- Cal Poly SLO Lines: 25 In article <122979@sun.Eng.Sun.COM> williamt@sun.UUCP (William A. Turnbow) writes: >Here is a short quicky (I hope). I am trying to do the following: > >find . -type d -exec grep string {}/* \; If you're trying to grep for a string in every file in or below the current directory, why not do this: find . -type f -exec grep string {} \; >However, find apparently does not expand the braces unless they are >separated by spaces. I've tried a variety of quotes and backslashes, >but no go. I suspect that find "sees" the /* after the braces, and presumes that you mustn't really want it to expand the filename there. I've never known find to need a space between the braces, but, then, that certainly doesn't mean that it never would expect that. :-) ------------------------------------------------------------------------------- | Steve DeJarnett | Smart Mailers -> steve@polyslo.CalPoly.EDU | | Computer Systems Lab | Dumb Mailers -> ..!ucbvax!voder!polyslo!steve | | Cal Poly State Univ. |------------------------------------------------| | San Luis Obispo, CA 93407 | BITNET = Because Idiots Type NETwork | -------------------------------------------------------------------------------