or, you could simply do 

find . -name "*vector*"



On Fri, 17 Mar 2000, Matthew Sayler wrote:

> I remember back in '00 when Yasin A. Vohra wrote:
> > Hi!
> > 
> > diamondback:~/Old/C++/myClass> ls
> > HW/                HW5/               class_slides/
> > syllabus.pdf.gz*
> > HW1/               HW6/               iomanip.pdf.gz*    test.pdf.gz*
> > HW10/              HW7/               iomanip.ps.gz
> > worksheet.pdf.gz*
> > HW2/               HW8/               note*
> > HW3/               HW9/               operators.pdf.gz*
> > HW4/               Solution/          schedule.pdf.gz*
> > diamondback:~/Old/C++/myClass>
> > 
> >     I am interested in finding all the files which contain vector with
> > their location.  Is there anyway to do it.
> 
> assuming you mean the string "vector":
> 
>       cd ~/Old/C++/myClass
> 
>       find . -type f | xargs grep vector
> 
> alternate solutions I thought of, in no particular order:
> 
>       find . -type f -exec echo {} \; -exec grep vector {} \;
>       
> or
>       grep vector */* 
> (assumes all files are located immediately under the listed
> directory)
> 
> Explanations can be furnished if required.  HTH.
> 
>               Matt
> 
> -- 
> /* Matt Sayler || [EMAIL PROTECTED] || http://www.thewalrus.org
>    "RFC 882 put the dot in .com" -- Christian Bauernfeind */
> ---------------------------------------------------------------------------
> Send administrative requests to [EMAIL PROTECTED]
> 

---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]

Reply via email to