bug-grep
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] grep: diagnose and exit-2 for bogus REs like [:space:],


From: Jim Meyering
Subject: Re: [PATCH 1/2] grep: diagnose and exit-2 for bogus REs like [:space:], [:digit:], etc.
Date: Fri, 03 Sep 2010 12:04:21 +0200

Paolo Bonzini wrote:
> On 09/01/2010 07:09 PM, Jim Meyering wrote:
>> I've just tweaked the documentation and pushed this:
>>
>> Subject: [PATCH 1/2] grep: diagnose and exit-2 for bogus REs like [:space:], 
>> [:digit:], etc.
...
> Reluctant ack. :)

Thanks.

Looking at the offending uses exposed by my code search, I realized
that exiting with status 2 will sometimes be insufficient to expose
the problem.  All it takes is redirected stderr, and there would be
no trace in most cases, e.g.,

    match=$(grep ...)
    test -n "$match" && ...

Thinking aloud...
How could grep get the end-user's attention?
Even aborting wouldn't make much of a difference.
However, if grep were to deliberately sleep for 10 or 20 seconds,
or even to infloop, *that* would make people sit up and listen ;-)

But don't worry.
I still have a few marbles left.



reply via email to

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