bug-grep
[Top][All Lists]
Advanced

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

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


From: Tim H
Subject: [bug #28329] egrep/fgrep should accept respectively -E/-F
Date: Sat, 19 Dec 2009 04:00:26 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091206 Firefox/3

Follow-up Comment #3, bug #28329 (project grep):

> 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.

> 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. After
many frustrating debugging sessions, I set the variable to save my sanity. I'm
trying to get into the habit of always using egrep but until that "takes",
this is my fallback.

I don't have a problem with programs ignoring incompatible options in cases
like this (a warning would be OK) but I'm sure purists do. Years of experience
tends to make one a little less dogmatic about things like this. ;-)


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?28329>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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