| From: Dave Collier-Brown via talk <talk@gtalug.org>

| F and fgrep are historical accidents.

I take it you mean the -F flag.

| IMHO, the only reason they still
| exist is bad practice from the v6 era, when we only had a 16-bit address
| space.

Actually, fgrep is useful because you don't need to ensure that the
pattern has no RE metacharacters (NewLine and (I presume) NUL remain
meta).

I've almost never used fgrep.  So maybe it isn't useful.  The
libreswan source tree has two lines referencing fgrep.

I always use the egrep command because I am most comfortable with its
variant of regular expressions.  grep -E takes 3 more keystrokes (I
count the shift).

The regex(7) manpage on Fedora 37 calls grep's version of regular
expresssions "obsolete" but notes that POSIX.2 calls them "basic".
The page says it was from Henry Spencer's regex package.

Reading the GNU grep(1) manpage, I learned something new: the pattern
argument to the greps is actually a list of patterns separated by
newlines.  How ugly but potentially useful:
        grep 'cat|dog'
could be written as:
        grep 'cat
dog'

This was always true of fgrep, one of the reasons I avoided it.  But
now it is true of the other variants.

|  The interface could be preserved forever: the implementation?
| Less so.

Oh, the implementations are gone.  It is the loss of the interfaces
that I and other fossils are objecting to.

grep is such a great thing that there are many variants.  Like agrep,
AWK and perl.  Snobol seems related but is actually earlier.
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

Reply via email to