bug-grep
[Top][All Lists]
Advanced

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

Re: [bug #28329] egrep/fgrep should accept respectively -E/-F


From: Paolo Bonzini
Subject: Re: [bug #28329] egrep/fgrep should accept respectively -E/-F
Date: Sat, 19 Dec 2009 10:58:43 +0100

>> I think setting -E in GREP_OPTIONS is an incredibly bad idea
>> :-) as it will break scripts.
>
> Since extended REs are almost completely backward compatible with simple REs,
> I think it is unlikely that this will break many scripts. I haven't found one
> yet where this is a problem.

Any script that greps for + or { or } or ? for example.

>> use "alias grep='grep -E'" instead
>
> I tried this for a while. Then I would spend time figuring out a RE at the
> command prompt only to have it break when I included it in a script.

So now it breaks when you give your scripts to others... (of course
you could add GREP_OPTIONS=-E to those scripts too, that would be a
good idea, but so you can also add an alias there too I think).

Paolo




reply via email to

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