Subject: bug#58502: We should not deprecate egrep and fgrep

From: Sam Trenholme <[email-masked]>
Date: Thu, 13 Oct 2022 10:46:32 -0700

After spending nearly an hour updating all of the scripts in the test
framework for one of my open source projects to no longer use egrep,
I’m going to say it:

We should not deprecate egrep and fgrep

egrep and fgrep have been around since the 1970s, were in wide use
well over 25 years ago on the SunOS machines we used at the time, and
are widely supported, e.g. Busybox includes an fgrep and egrep.

Even the Posix spec acknowledges that that should remain supported for
the foreseeable future:

“The old egrep and fgrep commands are likely to be supported for many
years to come as implementation extensions, allowing historical
applications to operate unmodified.”

See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html

Here is the amount of headache I went through to replace egrep with grep -E:

https://github.com/samboy/MaraDNS/commit/afc9d1800f3a641bdf1bf14d39802443a34c2b70

There are countless other shell scripts out there on countless
machines which still use these commands. We should not lightly break
widely deployed software, especially software which only needs two
one-line shell scripts.

-- Sam