GNU bug report logs - #57604
[ef]grep usage -> POSIXLY_CORRECT?

Previous Next

Package: grep;

Reported by: Karl Berry <karl <at> freefriends.org>

Date: Mon, 5 Sep 2022 22:08:02 UTC

Severity: normal

Merged with 58502, 60257, 66582

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Karl Berry <karl <at> freefriends.org>
Cc: 57604 <at> debbugs.gnu.org
Subject: bug#57604: [ef]grep usage -> POSIXLY_CORRECT?
Date: Tue, 6 Sep 2022 15:52:13 -0500
On 9/6/22 15:33, Karl Berry wrote:
> 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.

Python has PYTHONWARNINGS. I suppose GNU Grep could have a GREP_WARNINGS 
variable that could suppress these diagnostics from egrep and fgrep, 
along with diagnostics like these:

$ grep '\Q' /dev/null
grep: warning: stray \ before Q
$ grep '[:alpha:]' /dev/null
grep: character class syntax is [[:space:]], not [:space:]

We've been moving away from environment variables like GREP_OPTIONS, 
though, for security reasons. Perhaps we should let others comment.

In the meantime you can implement egrep and fgrep the way you like, as 
shell scripts in your private bin directory, as this is something you'll 
need for grep 3.8 anyway. And once you have that simple workaround, 
maybe we won't need the complexity of GREP_WARNINGS.





This bug report was last modified 1 year and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.