From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,9e32d0119366ce3c X-Google-Attributes: gidfee84,public From: strange@zk3.dec.com (Steve Strange USG) Subject: Re: UNIX command to search subdirs for text in a file Date: 1997/01/14 Message-ID: #1/1 X-Deja-AN: 209769241 references: <01bc018d$8f170bc0$17ee1bac@usbgrjeff> organization: Digital Equipment Corp. newsgroups: comp.unix.osf.osf1 In article <01bc018d$8f170bc0$17ee1bac@usbgrjeff> "Jeff Shervey" writes: > With DEC UNIX 3.2 how can I search a bunch of subdirectories for a certain > file that contains certain text. > I'm trying this command with no luck: > > grep -i "duplicate" | find . -name *.sql -print > > I've also tried: > > find . -name *.sql -print | grep -i "duplicate" *.pls How about something like find . -name "*.sql" -print | xargs egrep "duplicate" Steve -- Steve Strange strange@zk3.dec.com Digital Equipment Corporation, Nashua, NH (603) 881-0595 Digital UNIX Filesystem Development