3 ms·
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? ED
by leephillips 6y ago
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.
- tyingq 6y agoI 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.
- fanf2 6y agoNo, 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 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/ https://svnweb.freebsd.org/base/head/gnu/usr.bin/grep/ NetBSD has bsdgrep only http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/grep/ 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/ 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/src/usr.bin/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/usr.bin/grep 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/usr.bin 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/ https://svnweb.freebsd.org/base/release/2.0/gnu/usr.bin/
- deleted 6y ago[deleted]
- pwg 6y agoThe 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.
- dfalzone 6y agoThat 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.