[arch-general] egrep error after update
Hi folks I did my normal nightly update last night no issues but now every time i open an terminal i get the following egrep: warning: egrep is obsolescent; using grep -E system as follows Operating System: Arch Linux KDE Plasma Version: 5.25.5 KDE Frameworks Version: 5.97.0 Qt Version: 5.15.6 Kernel Version: 5.19.7-arch1-1 (64-bit) Graphics Platform: X11 Processors: 8 × AMD FX-8370E Eight-Core Processor Memory: 15.6 GiB of RAM Graphics Processor: AMD HAWAII Manufacturer: Gigabyte Technology Co., Ltd. Thanks Pete .
On Sat, Sep 10, 2022 at 10:48:08PM +0100, pete via arch-general wrote:
egrep: warning: egrep is obsolescent; using grep -E
Not really surprising, considering that this is what the command does.... /usr/bin/egrep ``` #!/bin/sh cmd=${0##*/} echo "$cmd: warning: $cmd is obsolescent; using grep -E" >&2 exec grep -E "$@" ``` Consider this a deprecation warning and fix your init scripts.
On Sat, 2022-09-10 at 22:48 +0100, pete via arch-general wrote:
I did my normal nightly update last night no issues but now every time i open an terminal i get the following
egrep: warning: egrep is obsolescent; using grep -E
https://bbs.archlinux.org/viewtopic.php?pid=2056808#p2056808
On Sat, 10 Sep 2022 23:55:51 +0200 Ralf Mardorf via arch-general <arch-general@lists.archlinux.org> wrote:
On Sat, 2022-09-10 at 22:48 +0100, pete via arch-general wrote:
I did my normal nightly update last night no issues but now every time i open an terminal i get the following
egrep: warning: egrep is obsolescent; using grep -E
https://bbs.archlinux.org/viewtopic.php?pid=2056808#p2056808
Thanks least some one with a decent reply Pete
On Sat, 10 Sep 2022 23:55:51 +0200 Ralf Mardorf via arch-general <arch-general@lists.archlinux.org> wrote:
On Sat, 2022-09-10 at 22:48 +0100, pete via arch-general wrote:
I did my normal nightly update last night no issues but now every time i open an terminal i get the following
egrep: warning: egrep is obsolescent; using grep -E
https://bbs.archlinux.org/viewtopic.php?pid=2056808#p2056808
Hi Once again I have been thru this system trying to locate just where the call to egrep is coming from i can not find it at all Interesting thing if i callup an xterm and su to root the call another xterm from there i do not get the warning on as a user i have looked i can not find the issue a little assistance would be much appreciated as i am at a loss now my system basically is unmoged with the only thing i have changed is i boot into a text prompt not straight into a graphical enviroment i use startx to go graphical using .xinitrc included below #!/bin/sh userresources=$HOME/.Xresources usermodmap=$HOME/.Xmodmap sysresources=/etc/X11/xinit/.Xresources sysmodmap=/etc/X11/xinit/.Xmodmap # merge in defaults and keymaps if [ -f $sysresources ]; then xrdb -merge $sysresources fi if [ -f $sysmodmap ]; then xmodmap $sysmodmap fi if [ -f "$userresources" ]; then xrdb -merge "$userresources" fi if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi # start some nice programs if [ -d /etc/X11/xinit/xinitrc.d ] ; then for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do [ -x "$f" ] && . "$f" done unset f fi xset -dpms exec startplasma-x11 #exec startkde #exec gnome-session #exec budgie-desktop #exec startxfce4 #exec startlxqt # twm & # xclock -geometry 50x50-1+1 & # xterm -geometry 80x50+494+51 & # xterm -geometry 80x20+494-0 & # exec xterm -geometry 80x66+0+0 -name login Hope someone can trow some light on this it appeared a few days ago after an update "pacman -Syu" Cheers pete
On Thu, 15 Sept 2022 at 22:13, pete via arch-general <arch-general@lists.archlinux.org> wrote:
Hope someone can trow some light on this it appeared a few days ago after an update "pacman -Syu"
I would suggest finding what is your login shell (set in /etc/passwd) then check all the files used by that shell, for example for bash .bash_profile, etc, and the files in the /etc/profile.d folder.
On 9/15/22 16:20, Piscium wrote:
On Thu, 15 Sept 2022 at 22:13, pete via arch-general <arch-general@lists.archlinux.org> wrote:
Hope someone can trow some light on this it appeared a few days ago after an update "pacman -Syu"
I would suggest finding what is your login shell (set in /etc/passwd) then check all the files used by that shell, for example for bash .bash_profile, etc, and the files in the /etc/profile.d folder.
If you don't find anything whether on global or system shell calls/dependencies, if you perform 'grep -r' for /usr/bin and /usr/lib, you'll fine several things calling for 'egrep' still, it doesn't matter you're not calling directly those, but perhaps some of their dependencies are. So it's not that even if you're up to date on Arch, that means nothing in your systems calls for egrep anymore. Some upstream SW might still be calling egrep... BTW, currently the message is not dangerous:
% cat /usr/bin/egrep #!/bin/sh cmd=${0##*/} echo "$cmd: warning: $cmd is obsolescent; using grep -E" >&2 exec grep -E "$@"
Of course seeing such messages is somehow scary, :) -- Javier
On 16/09/22 02:43, pete via arch-general wrote:
On Sat, 2022-09-10 at 22:48 +0100, pete via arch-general wrote:
I did my normal nightly update last night no issues but now every time i open an terminal i get the following
egrep: warning: egrep is obsolescent; using grep -E Hi Once again
I have been thru this system trying to locate just where the call to egrep is coming from i can not find it at all ... Cheers pete
Add these lines in /usr/bin/egrep just before the exec line in that script. printenv >> /tmp/egrep.printenv.$$ env >> /tmp/egrep.env.$$ set >> /tmp/egrep.set.$$ ps aux >> /tmp/egrep.ps.$$ echo "My PID=$$, Parent PID=$PPID" >> /tmp/egrep.pid.$$ And then once you get the egrep warning, check the above /tmp/egrep.* files for hints. This can be a good starting point to detect whats happening and from where. Amish
On Thu, 15 Sept 2022 at 22:13, pete via arch-general <arch-general@lists.archlinux.org> wrote:
Interesting thing if i callup an xterm and su to root the call another xterm from there i do not get the warning on as a user
Some terminals, such as konsole, allow one to configure what shell to use. If that is different from the login shell then the suggestion is to check also the files used by the other shell, for example, if the other shell is zsh, there is .zshenv, .zshrc, etc. If something like ohmyzsh is used, it would be good to check the files and packages used by it.
Hi pete,
but now every time i open an terminal i get the following
egrep: warning: egrep is obsolescent; using grep -E
Interesting thing if i callup an xterm and su to root the call another xterm from there i do not get the warning on as a user
Finding the minimum needed to re-create the problem would be useful. Run you shell as a login shell from an existing one to see if it triggers the problem. Assuming it's bash(1): $ echo $$ 5696 $ echo $SHELL /bin/bash $ bash -l → $ echo $$ → 26416 → $ exit → logout $ echo $$ 5696 $ The ‘→’ lines are the new shell. Does doing similar give you the daft egrep warning? If so, do starting a new shell without it being a login shell, i.e. drop the ‘-l’? -- Cheers, Ralph.
Hi Can be frustrating to track down for sure. Definitely check the shell stuff as others have suggested but the DE can also auto-start things so lets not limit the search to shell login or startup scripts. I'd check all auto-started scripts as well. Here's some things you may want to consider: 1) check all auto started scripts. 2) is it the first terminal you open or every terminal after that too 3) what happens if you switch to VT and login as yourself? Any egrep stuff? 4) reboot and login to VT (i.e. do not login to desktop). switch to VT and login - does that have a problem? Unlike (3) this will cover the case of something being done only first time its run (unlike (3)) 5) You could also try using find to grep for egrep, something like: find ~/ -type f -exec grep 'egrep' {} /dev/null \; or any other directory aside from your home dir that may be relevant. good luck. gene
On 10/09/2022 22:48, pete via arch-general wrote:
egrep is obsolescent
I learned a new word; "obsolescent" means "in the process of becoming obsolete". Good stuff.
participants (9)
-
Amish
-
Genes Lists
-
Javier
-
Jonathon Fernyhough
-
pete
-
Piscium
-
Ralf Mardorf
-
Ralph Corderoy
-
Reto