bug-grep
[Top][All Lists]
Advanced

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

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


From: Karl Berry
Subject: bug#57604: [ef]grep usage -> POSIXLY_CORRECT?
Date: Sun, 11 Sep 2022 16:56:36 -0600

    AFAIK, these new warnings cause no malfunction.

Only if you've already changed your entire world not to use [ef]grep.
Then of course the warnings have no effect :).

Otherwise, they certainly do. I have scripts that run [ef]hundreds of
times (in loops, on lots of files).  grep is fundamental to shell script
programming, after all. Thus unconditional-on-every-invocation the
warning renders the script unusable.

In other cases, outputting to stderr changes the behavior of the script,
as Sam wrote in msg #62.

See also msg #53 in this bug report:
  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57604#53
for effects far worse than anything on my own little systems.

In general, when a program has behaved in a given way for many years,
and you change the behavior, it just seems fundamental to me to provide
a way for users to get the previous behavior. GNU has been known for
backward compatibility and user-friendliness.

    Wouldn't it be better to fix the roots of the problem 

Well, we differ about "the root of the problem". To me, the original
deprecation was the mistake. I would have argued against it if I'd known
about it, but I missed it. Although I doubt you would have been swayed
by anything I could say, given this thread.

But never mind that, you're hardly likely to change your mind now. Thus
all I'm asking for is a way for [ef]grep to keep working
(forever). There is no harm in the programs. A configure-time option
would be fine.

    personal scripts or on the command line, create your wrapper script
    or alias/function.

As I said before, obviously these workarounds are trivial to do on a
person-by-person basis. Less so for whole systems.

But the general point is, why must you force work on the rest of the
world? In the real world (as opposed to the POSIX_ME_HARDER world that
you apparently want everyone to live in), the warning decreases
portability: scripts that worked before no longer work. There is nothing
forcing you to give that warning unconditionally.  Why is this in the
spirit of GNU? As I wrote from the coding standards ...

If distros choose to stupidly remove [ef]grep, that's their (and their
users') problem. There's nothing that says you need to contribute to it,
and plenty that says you shouldn't. -k





reply via email to

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