This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: recursive grep
- To: earnie_boyd AT yahoo dot com, Dan Richards <rodan AT roving dot com>, cygwin cygwin <cygwin AT sourceware.cygnus dot com>
- Subject: Re: recursive grep
- From: CW <crwfl AT yahoo dot com>
- Date: Tue, 14 Sep 1999 11:08:41 -0700 (PDT)
Here is a simple rgrep I use, never tried it with bash
however.
#!/bin/ksh
for FILE in `find . -name $2 -print`
do
if [ `grep -c $1 $FILE` -ne 0 ]
then
echo $FILE
grep -i -n $1 $FILE
fi
done
Carson
--- Earnie Boyd <earnie_boyd@yahoo.com> wrote:
> --- Dan Richards <rodan@roving.com> wrote:
> >
> > I'm a new cygwin user, so far I'm pretty happy,
> but...
> >
> > Is there something I'm missing, or does this
> version of grep not support
> > a recursive option? I've never used a grep that
> couldn't do this....
>
> And I've never seen one that does. I know there
> exists a package called rgrep
> that will do what you want but you'll have to find
> the source and build it.
> ===
> Earnie Boyd <mailto:earnie_boyd@yahoo.com>
>
> Newbies, please visit
> <http://www.freeyellow.com/members5/gw32/index.html>
>
> (If you respond to the list, then please don't cc
> me)
> __________________________________________________
> Do You Yahoo!?
> Bid and sell for free at http://auctions.yahoo.com
>
> --
> Want to unsubscribe from this list?
> Send a message to
> cygwin-unsubscribe@sourceware.cygnus.com
>
>
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com