On 0, Richard Kimber <rkimber@ntlworld.com> wrote:
> I don't seem to be able to get the grep I have ( 2.4.2-3) to search
> recursively. The man page gives a -r option for this, and this is what
> I've always used with my previous distro. Is there a bug? Or am I using
> it incorrectly?
>
> grep -r text *.htm
>
> only finds text in the current directory, but this is how I've always used
> it for recursive work.
Others have explained why this is wrong. What you are looking for is:
find . -name '*.htm' -exec grep -H text {} \;
Tom
--
Tom Cook
Information Technology Services, The University of Adelaide
"Other people's priorities are endlessly odd."
- Kingsley Amis
Get my GPG public key: https://pinky.its.adelaide.edu.au/~tkcook/tom.cook-at-adelaide.edu.au
Attachment:
pgpibRi0KZF9a.pgp
Description: PGP signature