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.