Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Nov 2003 22:37:45 -0500 (EST)
From:      Francisco Reyes <lists@natserv.com>
To:        Matthew Hunt <mph@astro.caltech.edu>
Cc:        FreeBSD Questions List <questions@freebsd.org>
Subject:   Re: Recursion with grep?
Message-ID:  <20031113223611.X85161@zoraida.natserv.net>
In-Reply-To: <20031113224657.GA66502@wopr.caltech.edu>
References:  <20031113173505.F84157@zoraida.natserv.net> <20031113224657.GA66502@wopr.caltech.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 13 Nov 2003, Matthew Hunt wrote:

> > The man page for grep says to use "-r" to recurse, yet when I try
> > something like
> >
> > grep -r -li string *.c
> >
> > I get no files. However, if I go into one of the subdirectories and do a
> > plain grep <string> *.c then <string> is found on several files.
>
> When using "-r", the arguments to grep should be directories.  It will
> process all of the files in the given directories, recursively.  There is
> no provision for searching a subset of the files (i.e. "*.c).  If you
> need to do that, use find and xargs.


I wonder how difficult this would be to fix/change.
Seems strange nobody has looked into this.

For someone familiar with C how long you think it would take to change?
Sounds like a good small project to pay someone to look into it. :-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031113223611.X85161>