[SLUG] Pah, that Allsopp
John Allsopp
john at johnallsopp.co.uk
Tue Nov 13 17:07:10 GMT 2007
Ross Kendall wrote:
> Hi John,
>
> My understanding is that while the 'grep -r' might be recursive, the
> simple pattern match for the filename isn't (*php*).
> grep -ir "models" *php*
> ...does a (case insensitive) recursive grep ("models") on any file or
> directory in the current dir that matches *php*
> So I guess your subdir doesn't match the string *php*
>
> I would use find and grep together to do what you want:
> find ./ -name *php* -type f -exec grep -i "models" '{}' \;
>
> Hope that helps.
>
> Cheers,
> Ross.
Sounds great Ross, thanks a lot, makes sense (kinda).
Y'see Fintan, it's not that hard :-)
J
More information about the Scarborough
mailing list