As of sys-apps/grep-3.8 the installed program /bin/egrep now issues a warning, literally: egrep: warning: egrep is obsolescent; using /bin/grep -E if run from a shell script, e.g. this one: #!/bin/sh egrep "$@" IT DOES NOT DO THIS WHEN RUN FROM THE COMMAND LINE (try both). This is the dumbest thing since the chocolate teapot, but presumably given that it comes from the gods, it (doing it in one place not the other) won't change. The only fix is to find any shell scripts that use it (and, presumably, programs using system()) and change them. Not a gentoo bug, I entered it solely with the aim of helping people who are wondering what has happened.
(In reply to John Bowler from comment #0) > As of sys-apps/grep-3.8 the installed program /bin/egrep now issues a warning This is expected, and is mentioned in the NEWS file for this release. > IT DOES NOT DO THIS WHEN RUN FROM THE COMMAND LINE (try both). Your interactive shell probably has an alias defined. The app-shells/bash package installs /etc/bash/bashrc, which does the following: > alias grep='grep --colour=auto' > alias egrep='grep -E --colour=auto' > alias fgrep='grep -F --colour=auto'
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04add5d9bfe8a7b790ad8564e11f7c5bd7846139 commit 04add5d9bfe8a7b790ad8564e11f7c5bd7846139 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2022-09-11 23:10:25 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2022-09-11 23:10:25 +0000 app-shells/bash: remove egrep/fgrep aliases from bashrc Upstream has declared these forms to be deprecated. Aliasing them to 'grep -E' and 'grep -F' prevents the deprecation warning from being displayed, which could lead to confusion. Bug: https://bugs.gentoo.org/869788 Signed-off-by: Mike Gilbert <floppym@gentoo.org> app-shells/bash/files/bashrc | 2 -- 1 file changed, 2 deletions(-)
Indeed you are correct. "type egrep". I'm an ancient UNIX programmer, I don't expect the world to be changed under my feet (I've never used grep, it's dumb). Oh well...