grep -i -R path32 * vs grep -i -R path32 *.vb*

Gareth Pearce tilps@hotmail.com
Wed Oct 9 19:10:00 GMT 2002




>Ok, I can live with that.  For my understanding, what
>does the -R expand then?  I had visualized that -R
>with grep was simular to ls -R.  Where ls -R magically
>displays all files with out having to specify a search
>path.  So I was thinking that grep -R magically
>searched all the files without having to specify a
>search path, and the *.vb* was the file designation.

ls -R works identically as grep -R ...

the ls command merely 'defaults' to . if no file is given - where as grep 
defaults to 'stdin' .

try ls -R *.vb* - you will see it gives you nothing as well.

>
>However, the conclusion I'm coming to is that the
>[FILE] of "Usage: grep [OPTION]... PATTERN [FILE] ..."
>is really a directory _and_ file pattern.

-R means 'recurse any directories in the input set.'
when the input set is *.vb* - theres no directories - so no recursion 
occurs.

Gareth - idly ponders why the grep he installed himself on this dec machine 
doesnt have --include.

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list