bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#34951: [PATCH] grep: a kwset matcher not work in a grep matcher


From: Eric Blake
Subject: Re: bug#34951: [PATCH] grep: a kwset matcher not work in a grep matcher
Date: Sat, 23 Mar 2019 07:39:25 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

On 3/22/19 9:59 PM, Budi wrote:
> How make grep walking through FS by scanning breadth first instead of
> 
> On 3/23/19, Budi <address@hidden> wrote:
>> How make grep walinh through FS by scanning breadth first instead of
>> the usual depth
>>
>> On 3/23/19, Norihiro Tanaka <address@hidden> wrote:
>>> On Sat, 23 Mar 2019 08:06:35 +0900
>>> Norihiro Tanaka <address@hidden> wrote:
>>>
>>>> A kwset matcher is not built in a grep matcher after token re-order is

Budi,

Hijacking a tread on a posted patch to ask an unrelated question via
top-posting is not very nice netiquette.  Better is to start a new
thread for asking questions, and to use bottom posting for technical lists.

That said, the answer to your question is that there is no way to change
the way that grep walks the file system when using 'grep -r'. And when
you consider that 'grep -r' is a GNU extension not required by POSIX
(http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html),
and that we are reluctant to bloat grep any further when 'find' already
exists as the POSIX-sanctioned file walker, you are better off getting
'find' to do the traversal you want (where find or xargs is used to
invoke plain 'grep' on the resulting files) rather than trying to
convince us to patch 'grep -r' to have more flexibility.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]