Hello.

I do not think this has been reported already, on systems which
use GNU grep(1) postfix produces obsoletion messages.

  $ egrep x y
  egrep: warning: egrep is obsolescent; using grep -E

  $ grep -r egrep /usr/lib/postfix-lmdb/
  /usr/lib/postfix-lmdb/postfix-tls-script:for _algo in `$postconf -T 
public-key-algorithms | egrep '^(rsa|ecdsa)$'`
  /usr/lib/postfix-lmdb/postfix-tls-script:       hex_sha256 | egrep -v 
"${null256}" && return 0
  /usr/lib/postfix-lmdb/postfix-tls-script:       hex_sha256 | egrep -v 
"${null256}" && return 0
  /usr/lib/postfix-lmdb/postfix-script:       egrep 
'/(saved|incoming|active|defer|deferred|bounce|hold|trace|corrupt|public|private|flush)$'`
 \

  $ pkginfo -o /usr/bin/egrep
  Package  File
  grep     usr/bin/egrep

  $ prt-get info grep
  Name:         grep
  Path:         /usr/ports/core
  Version:      3.8
  Release:      1
  Description:  GNU grep, egrep and fgrep
  URL:          https://www.gnu.org/software/grep/grep.html
  Maintainer:   CRUX System Team, core-ports at crux dot nu
  Dependencies: libpcre2

POSIX says on this

  This grep has been enhanced in an upwards-compatible way to
  provide the exact functionality of the historical egrep and
  fgrep commands as well.
  It was the clear intention of the standard developers to
  consolidate the three greps into a single command.  The old
  egrep and fgrep commands are likely to be supported for many
  years to come as implementation extensions, allowing historical
  applications to operate unmodified..

This seems to come from Issue 2, released January 1987.
BSD 4.4 writes in usr/src/usr.bin/grep/README/README.FIRST from
1987-06-24 (re-formatted):

  here is the fast 'grep/egrep' package sent to comp.sources and
  u. c. berkeley.
  included are the prerequisite routines developed by henry
  spencer of univ. of toronto -- these are also part of the
  comp.sources archive.

  i've already updated spencer's care package to incorporate three
  fixes which have appeared in the same forum.

  the makefiles are configured for bsd 4.3 and sys5 unix.
  they assume that the spencer regexp() is not already in a system
  library -- read the makefile comments if this is not the case.

  for stock 4.3 sites, apply the diff 'diff.egrep.y.bsd' to the
  existing source in /usr/src/usr.bin/egrep.y and re-make.  this
  adds full support for the -i option.  the procedure is then:

          make
          sh eg.shell     # amusement
          make install

  ames!jaw

However, in System V10 it seems there was still a differentiation
even later

  $ find . -type f -name '*grep*'
  ./V10/cmd/grep.c
  ./V10/cmd/fgrep.c
  ./V10/cmd/uucp/uugrep.c
  ./V10/cmd/gre/dofgrep.c
  ./V10/cmd/egrep/egrep.dist
  ./V10/cmd/egrep/egrep.c
  ./V10/cmd/backup.old/bgrep.c

But BSD CSRG comes over with

  $ git show master:usr.bin/grep/egrep/Makefile
  #       @(#)Makefile    8.1 (Berkeley) 6/27/93
...
  LINKS=  ${BINDIR}/egrep ${BINDIR}/grep ${BINDIR}/egrep ${BINDIR}/fgrep
  MLINKS= grep.1 egrep.1 grep.1 fgrep.1
...

Which is 30 years ago.  I am pretty sure that around Y2K FreeBSD
and Linux used grep(1) as a multiplexer already.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to