Subject: Re: bug#57604: [ef]grep usage -> POSIXLY_CORRECT?

From: Karl Berry <[email-masked]>
Date: Tue, 6 Sep 2022 14:33:00 -0600

Actually, egrep and fgrep were not entirely portable 

They were portable to every system I ever used (admittedly not the
entire world), before POSIX got involved.

    These days, my impression is that it's more portable to use grep -E
    than to use egrep.

I agree. And IMHO that is a bug POSIX gratuitously introduced.

    That wouldn't be right, as POSIXLY_CORRECT governs misfeatures required 
    by POSIX, which isn't the case here: 

IMHO it is the case. The misfeature being fixed is POSIX unblessing
[ef]grep.

But, whatever. Since it bothers you to use POSIXLY_CORRECT, let's invent
some other envvar that turns off the warning, like
"PLEASE_LET_ME_USE_EFGREP_I_DONT_CARE_ABOUT_POSIX", and Arnold and I
will set it and life can go on.

    https://bugs.gnu.org/49996

I'm unconvinced. What Simon's bug report says is "hey, why not deprecate
[ef]grep because it's time". Well, IMHO it's not time, and will never be
time, and "deprecation" merely means "cause trouble for users for no
real reason". My "pet issue" is the exact opposite of Simon's ...

Without some way to turn off those warnings, GNU [ef]grep become
unusable without editing to remove the comment. It is completely
infeasible, not to mention a tremendous waste of time, to edit
everywhere on my systems that use them, after 40 years of historical
usage.

I'm not saying scripts intended to be portable should not be changed (as
we know, they have had to be, because POSIX forced it). But all the
scripts in the world which are *not* needed to be portable don't need to
be changed. They just need to keep working and not be randomly broken by
outside forces.

[ef]grep are fundamental names for the utility. Please reconsider. -k