You are not logged in.
Pages: 1
Topic closed
After recent updates to grep, I am now seeing a warning line the first time I run a console window (such as konsole) in the plasma desktop after a reboot, which is the single line:
egrep: warning: egrep is obsolescent; using grep -E
after that the terminal runs as normal.
Opening subsequent terminal windows does not give that warning. It is not a big issue, but I wondered if that is a bug, or whether a gentle nudge to stop using egrep if you haven't already! Perhaps there is a way to switch that off even though it happens only once after a reboot!
Last edited by mcloaked (2022-09-10 21:30:46)
Mike C
Offline
Have you located what script is calling egrep?
Offline
No I haven't found anything obvious. It just started happening after the grep update to 3.8 - there is no reference to that command in .bashrc so nothing obvious calling it! It happens whether the first call is to konsole, or to qterminal - but once either has been opened then all subsequent new konsole or qterminal windows don't have that line! Maybe it is a new bug!
Mike C
Offline
Your shellrc would not be relevant, but your profile(s) are. Check ~/.bash_profile, /etc/profile, and any files included from them and perhaps check the bash man page to see if there are other files sourced for a login shell.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
OK I do call a file from my .bashrc which does contain egrep! So I will change that - thank you.
Mike C
Offline
The warning is an upstream change...
https://www.phoronix.com/news/GNU-Grep- … grep-fgrep
As Trilby says the egrep command is being called somewhere in your login shell configs.
Offline
Thank you, and yes I found one of my files that was called from .bashrc had a line that needed changing:
$ diff ssh-agent-start.sh ssh-agent-start.sh.prev
33c33
< eval "$agent |grep -E -v 'echo Agent pid' > $info"
---
> eval "$agent |egrep -v 'echo Agent pid' > $info"
Making that change now fixes the issue (the file has been in place there for quite a few years - and I hadn't realised the egrep command was still there! I was aware that egrep (and fgrep) are now obsolete!
Mike C
Offline
/usr/bin/xdg-open from the xdg-utils package generates the same warning.
Offline
/usr/bin/xdg-open from the xdg-utils package generates the same warning.
https://gitlab.freedesktop.org/xdg/xdg- … equests/21
https://gitlab.freedesktop.org/xdg/xdg- … equests/44
Offline
virtualenvwrapper seems to be another source:
$ cat /usr/bin/virtualenvwrapper.sh | grep egrep
if echo "$workon_home_dir" | (unset GREP_OPTIONS; command \egrep '([\$~]|//)' >/dev/null)
| (unset GREP_OPTIONS; command \egrep -v '^\*$') 2>/dev/null
pip freeze | egrep -v '(distribute|wsgiref|appdirs|packaging|pyparsing|six)' > "$req_file"
Offline
We don't need a pile of "this too" posts here as they serve no purpose. If you find a package-provided script that uses egrep, please open a bug report / feature request on the bug tracker where the relevant people will actually see it.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
In the case of virtualenvwrapper https://bitbucket.org/virtualenvwrapper … equests/84 assuming the PR is merged within a few days, followed by a new release I would wait for that.
Offline
Wow that's a bad decision by upstream. These have literally been around since before I was born. Just leave them be and don't break scripts.
Offline
Wow that's a bad decision by upstream. These have literally been around since before I was born. Just leave them be and don't break scripts.
Whether or not this is true (I'm ambivalent), the thread has been solved, and this isn't constructive contribution.
Closing.
All the best,
-HG
Offline
Pages: 1
Topic closed