[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #32520] If you use --include -- grep does not recurse allsubdir
From: |
Gilles Espinasse |
Subject: |
Re: [bug #32520] If you use --include -- grep does not recurse allsubdirectires |
Date: |
Thu, 17 Feb 2011 23:27:53 +0100 |
----- Original Message -----
From: "Keith Daniels" <address@hidden>
To: "Reuben Thomas" <address@hidden>; "Keith Daniels"
<address@hidden>; <address@hidden>; <address@hidden>
Sent: Thursday, February 17, 2011 10:36 PM
Subject: [bug #32520] If you use --include -- grep does not recurse
allsubdirectires
> Follow-up Comment #4, bug #32520 (project grep):
>
> Hi Reuben
>
> I agree that it makes --include useless. I decided that the person
writing
> the Info file believed it was supposed to work this way from reading this
clip
> from the info file:
>
> ------
> grep -rH 'hello' *.c
>
> which merely looks for 'hello' in all files in the current
> directory whose names end in '.c'. Here the '-r' is probably
> unnecessary, as recursion occurs only in the unlikely event that
> one of '.c' files is a directory.
> ------
[chroot-i486] root:/tmp$ mkdir foo foo/bar
[chroot-i486] root:/tmp$ echo yup >foo/faz
[chroot-i486] root:/tmp$ echo yup >foo/bar/gaz
[chroot-i486] root:/tmp$ echo yup >foo/no
[chroot-i486] root:/tmp$ grep -r --include=*az yup .
./foo/bar/gaz:yup
./foo/faz:yup
[chroot-i486] root:/tmp$ grep --version
grep (GNU grep) 2.7
This is a vanilia grep-2.7
Gentoo grep-2.5.4 , Debian v5 grep-2.5.3 behave the same
So -r work with --include to my understanding
Gilles