bug-grep
[Top][All Lists]
Advanced

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

bug#22701: egrep/fgrep shows as 'grep -E'/'grep -F' in ps output


From: Paul Eggert
Subject: bug#22701: egrep/fgrep shows as 'grep -E'/'grep -F' in ps output
Date: Tue, 16 Feb 2016 09:46:57 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 02/16/2016 08:58 AM, Jaroslav Skarvada wrote:
previously egrep/fgrep shows as egrep/fgrep in ps output, now it
shows as 'grep -E'/'grep -F'. Personally I don't see much problem in
it, but I received some bug reports regarding it downstream.

It's not a bug, as 'grep' should be free to choose its own implementation strategy.

Originally GNU egrep and fgrep were implemented via shell scripts, as they are now. In 2005 we changed them to be separate executables (I think it was for performance and/or installation reasons), but doing this made them harder to maintain. The circa-2005 issues are no longer significant in practice, so we changed them back to scripts in 2014.

By the way, POSIX has removed egrep and fgrep, so portable applications should be using grep -E and grep -F instead. We won't be removing these obsolete scripts from GNU grep any time soon, though.

+          if (strncmp(ptr_c - 5, "egrep", 5) == 0)
+            setmatcher ("egrep");

The GNU Coding Standards say that program behavior should be independent of the name used to invoke the program.





reply via email to

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