Why should GNU maintain 3 different command profiles on their own? If is really necessary or useful distros can easily shim them to a grep wrapper if they want to
On their own it's probably trivial. I suspect over time it becomes a large tasks/maintenance question.
Depending on the number of additional commands on similar removal paths it may have performance/memory improvement implications for minimum supported specs.
interesting, on openbsd they are the same inode and it uses it uses arg0 to figure out what to do.
ls -li /usr/bin/grep /usr/bin/egrep /usr/bin/fgrep
285407 -r-xr-xr-x 6 root bin 31896 Aug 14 15:23 /usr/bin/egrep
285407 -r-xr-xr-x 6 root bin 31896 Aug 14 15:23 /usr/bin/fgrep
285407 -r-xr-xr-x 6 root bin 31896 Aug 14 15:23 /usr/bin/grep
- Based on the NEWS file, it sounds like pre-v2.0 (1993) versions had totally separate implementations for each program and didn't have -E, -F, or -G flags (but only history back to 1998 has been imported to Git, and I don't feel like digging up old tarballs to verify)
But I can see why it could bother people, the idea that a function changes based on it's name is weird, after all the name is just a symbolic identifier, it should not matter if the name is "search" or "grep" it should do the same thing.
But I decided it does not matter, mainly because names are really important, so important that changing the name effectively changes the function, for example if you took the sin() and renamed it destroy_universe() there would be so much uncertainty about both the new name and the lack of the old, that it does not matter that the code is the same, you have to now treat them different, so having code that does different things based on the name is fine.
Hm, I just dislike magic like that. It tends to go wrong in weird ways. If I'd compile it and symlink to it as fgrep-gnu for example. But of course, the wrappers would be even more confusing, executing the system grep, not the compiled grep. So removing the wrappers is fine.
Those are not provided by GNU grep, they are an Arch thing (could exist on other distros as well, I'm not sure). The scripts are hand-written for keeping the support with older scripts.
I imagine Arch is not using GNU's egrep and fgrep anymore because of the deprecation.
This also answer the question on why is not necessary to GNU to maintain those different commands. Distros can easily shim them to grep if they want to, similar to how a lot of them already link /bin/sh to bash
In general, Arch avoids doing Arch-specific things and prefers to provide vanilla upstream packages, a lot more than other distros avoid doing distro-specific things.
I have numerous scripts in production that rely on fgrep. Not sure about egrep. So I'm happy there's a warning before these commands are eventually removed.