home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!nwnexus!Celestial.COM!bill
- From: bill@Celestial.COM (Bill Campbell)
- Subject: Re: recursive grep'ing
- Organization: Celestial Software, Mercer Island, WA
- Date: Wed, 30 Dec 1992 18:21:41 GMT
- Message-ID: <1992Dec30.182141.6976@Celestial.COM>
- References: <Bzvwwo.Aq8@NCoast.ORG> <1992Dec28.043508.3237@csie.nctu.edu.tw> <BAB.92Dec28110925@se39.wg2.waii.com>
- Lines: 24
-
- In <BAB.92Dec28110925@se39.wg2.waii.com> bab@se39.wg2.waii.com (Brian Button) writes:
-
- ........
- >Ji-Tzay> find . -name "*" -print | xargs grep "YOUR PATTERN"
-
- >You should be able to drop the -name part, since you want all names.
-
- >Just use find . -print | xargs grep "PATTERN"
-
- This would merrily grep your directories too which probably isn't
- what you want.
-
- find . -type f -print | xargs grep 'pattern' /dev/null
-
- Only looks at the files and the /dev/null argument insures that
- grep will always have at least two files as arguments so that it
- will display the filename.
-
- Bill
- --
- INTERNET: bill@Celestial.COM Bill Campbell; Celestial Software
- UUCP: ...!thebes!camco!bill 6641 East Mercer Way
- uunet!camco!bill Mercer Island, WA 98040; (206) 947-5591
- SPEED COSTS MONEY -- HOW FAST DO YOU WANT TO GO?
-