News for hackers. Stuff that matters.
Re:In Unix, what do some obscurely named commands stand for?... by leephillips on Wednesday September 09, 2020 @10:59AM (#24421745)
On my Ubuntu laptop, egrep is just a script that calls grep with -E. Did egrep absorb grep? Is the old grep still commonly installed with any distributions?

EDIT: and fgrep also is a script that calls grep, with the F argument.

Re:In Unix, what do some obscurely named commands stand for?... by pwg on Wednesday September 09, 2020 @11:33AM (#24422130)
The GNU tool-set merged all three into grep, and kept the fgrep and egrep names for backwards compatibility. This is described in the man page in this manner:

> In addition, two variant programs egrep and fgrep are available. egrep is the same as grep -E. fgrep is the same as grep -F. Direct invocation as either egrep or fgrep is deprecated, but is provided to allow historical applications that rely on them to run unmodified.

Re:In Unix, what do some obscurely named commands stand for?... by dfalzone on Wednesday September 09, 2020 @04:03PM (#24425306)
That sure sounds like GNU. Instead of building tiny tools that each do one things, just make one big tool that can do a bunch of things depending on which of a hundred flags you use. Not to shit on GNU; I use GNU/Linux on all my own computers. But I notice that a lot of GNU software suffers from severe feature creep.
Re:In Unix, what do some obscurely named commands stand for?... by tyingq on Wednesday September 09, 2020 @11:02AM (#24421783)
I think it's common on several distributions for egrep, fgrep, zgrep, etc to all link to (or have small shell wrappers for) grep, which is gnu grep.

I would guess the various BSD distros have traditional separate greps.

Re:In Unix, what do some obscurely named commands stand for?... by fanf2 on Wednesday September 09, 2020 @12:51PM (#24422955)
No, for a long time the BSDs usually used GNU grep, though there is a newer BSD grep for those who are more concerned about the GPL than performance

FreeBSD bsdgrep https://svnweb.freebsd.org/base/head/usr.bin/grep (see the makefile for build options, and note that it does egrep and fgrep too)

FreeBSD GNU grep https://svnweb.freebsd.org/base/head/gnu/usr.bin/grep/

NetBSD has bsdgrep only http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/grep/ (observe nothing but the Attic in src/gnu/usr.bin/grep)

OpenBSD too http://cvsweb.openbsd.org/src/usr.bin/grep/

4.3BSD-Reno and 4.4BSD are complicated - looks like the Bell Labs separate greps have been moved aside in favour of a replacement unified grep by James Woods (not GNU grep) -https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Reno/sr... - https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.4BSD/usr/src...

There is no grep in 4.3BSD-Net/2 which was the first mostly complete unencumbered BSD release and the original basis of the open source BSDs - https://minnie.tuhs.org/cgi-bin/utree.pl?file=Net2/usr/src/u... - so they adopted GNU grep to fill the gap as you can see in the FreeBSD-2.0 source https://svnweb.freebsd.org/base/release/2.0/gnu/usr.bin/