Recursion with grep?

Matthew Hunt mph at astro.caltech.edu
Thu Nov 13 15:18:16 PST 2003


On Thu, Nov 13, 2003 at 02:55:34PM -0800, Chris Readle wrote:

> You can also do this with something like:
> 
> ls -laR | egrep *.c

He's trying to search the contents of files for a string.  Your
suggestion searches the directory listing (and not in a very useful way,
since *.c does not mean the same thing as a regular expression as it
does as a wildcard, and it could also match parts of the "ls -l" output
besides the filename).

-- 
Matthew Hunt <mph at astro.caltech.edu> * Stay close to the Vorlon.
http://www.pobox.com/~mph/           *


More information about the freebsd-questions mailing list