Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!texbell!vector!attctc!jolnet!gaggy From: gaggy@jolnet.ORPK.IL.US (Gregory Gulik) Newsgroups: comp.unix.wizards Subject: Re: recursive grep Message-ID: <1459@jolnet.ORPK.IL.US> Date: 1 Sep 89 14:38:02 GMT References: <666@lakart.UUCP> <1641@cbnewsl.ATT.COM> <7774@cbmvax.UUCP> <3478@yunexus.UUCP> Reply-To: gaggy@jolnet.orpk.il.us (Gregory Gulik) Organization: Jolnet, Public Access Unix, Orland Park (Joliet), Ill. Lines: 36 In article <3478@yunexus.UUCP> oz@yunexus.UUCP (Ozan Yigit) writes: >In article <7774@cbmvax.UUCP> grr@cbmvax.UUCP (George Robbins) writes: > >>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. > >Well, everyone has a zippy solution, but it seems, backquotes are either >out of fashion, too simple, or because of broken shells, ("Arguments too >long" ?? Nooo... really ??) nobody suggested something like > > egrep ptui `find whatever -print` > >Hmm. I thought I had it all this time. :-) > >oz Well, it seems it SHOULD work, but not quite. If the directory you are looking through is rather large, you'll get an error from the shell. I tried a command similar to the above and ksh gave me this: ksh: /usr/bin/egrep: arg list too long I assume other shells have similar limitations. That why there is an xargs command. I don't have access to a BSD machine so I can't speak about csh. Maybe csh can handle it better so it doesn't need xargs??? -greg -- Gregory A. Gulik Phone: (312) 825-2435 E-Mail: ...!jolnet!gagme!greg || ...!chinet!gag || gulik@depaul.edu || variations thereof.