For about a year or so, during some pacman transactions, I sometimes receive the error:
egrep: warning: egrep is obsolescent; using grep -E
What is this and is there anything that should be done?
For about a year or so, during some pacman transactions, I sometimes receive the error:
egrep: warning: egrep is obsolescent; using grep -E
What is this and is there anything that should be done?
It’s not an error - just a notice.
Nothing needs to be done.
Egrep has been deprecated for quite a while.
It’s easy enough to bypass with:
alias egrep="/usr/bin/grep -E"
egrep and fgrep – Replaced by grep flags
grep, egrep and fgrep. They all sound similar, right? Because they are similar to each other.
The grep is the first and oldest of the lot and it was created decades ago.
egrep and fgrep commands were created a little later to extend the functionality of the grep command.
- The egrep command allows the use of extended regex.
- The fgrep command works on fixed strings instead of regex (default grep behavior).
But why have separate commands when they can be options under the original commands.
And that’s exactly what happened. The grep command was modified to add new options that provided the same functionalities as egrep (with grep -E) and fgrep (with grep -F).
But the legacy of egrep and fgrep continues even today, unfortunately. Many tutorials, websites and books still mention them. Distributions still include these commands.
Suggested alternative: grep -E for egrep and grep -F for fgrep.
So you arent using egrep
?
Do you have some sort of crusty pacman hook?
(maybe look with something like grep -R 'egrep' /usr/share/libalpm/hooks/
)
It would be easier to ascertain where this is from if we saw the error in context.
Gazillion of packages and tools are still using egrep. I mean packages (with hooks) in the repos, not aur. This is one of the things that will take a decade to die. At least. Just forget it.
Which?
I dont have such messages.
And I would be a bit surprised if any arch hooks used a deprecated command.
Don’t have the manjaro pc right now to check. From memory, for example rkhunter still uses egrep.
rkhunter
package does not provide any hooks. So still a mystery
Perhaps next time you could give us the full context of the activity that caused that error.
I just want to know.
I have been a programmer for 45 years and I know how much time maintenance costs. But not maintaining a program is unacceptable.
But we don’t know the context where he saw it - he didn’t say.
I did search (grep) my entire system and only found egrep
mentioned in some build/configuration scripts for AUR packages.