Re:We are stuck with egrep and fgrep (unless you like beatin...
by koprulusector on Thursday October 13, 2022 @10:50AM
(#33191771)
Thanks for sharing. I feel less silly for suggesting this now (as root):
unalias grep && unalias egrep && cp "$(command -v grep)" "$(dirname "$(command -v grep)")/egrep
Re:We are stuck with egrep and fgrep (unless you like beatin...
by froh on Thursday October 13, 2022 @06:51PM
(#33197509)
why no hard link?
Re:We are stuck with egrep and fgrep (unless you like beatin...
by Izkata on Thursday October 13, 2022 @10:03AM
(#33191100)
I didn't check where they came from, but on Ubuntu 18.04: egrep, fgrep, and rgrep are shell scripts that call grep with -E, -F, and -r
Re:We are stuck with egrep and fgrep (unless you like beatin...
by drewg123 on Thursday October 13, 2022 @10:18AM
(#33191285)
On FreeBSD, it checks the first character of the program name and modifies behavior based on that. See
https://github.com/freebsd/freebsd-src/blob/main/usr.bin/gre...
Re:We are stuck with egrep and fgrep (unless you like beatin...
by kevans91 on Thursday October 13, 2022 @01:29PM
(#33194037)
FWIW, I have no interest in making a similar change to bsdgrep and I can't imagine anyone else would be compelled to bother, either. I just don't see the value in removing these historical names that makes the hassle worth it.
On FreeBSD, they are all the same:
$ ls -li /usr/bin/egrep /usr/bin/fgrep /usr/bin/grep /usr/bin/rgrep
281835 -r-xr-xr-x 4 root wheel 30736 Sep 26 14:37 /usr/bin/egrep
281835 -r-xr-xr-x 4 root wheel 30736 Sep 26 14:37 /usr/bin/fgrep
281835 -r-xr-xr-x 4 root wheel 30736 Sep 26 14:37 /usr/bin/grep
281835 -r-xr-xr-x 4 root wheel 30736 Sep 26 14:37 /usr/bin/rgrep