From: cowan@mercury.ccil.org (John Cowan)
Subject: [TUHS] Short history of 'grep'
Date: Sun, 31 Jan 2016 12:38:46 -0500 [thread overview]
Message-ID: <20160131173846.GB7792@mercury.ccil.org> (raw)
In-Reply-To: <56AE4029.7010701@mhorton.net>
Mary Ann Horton scripsit:
> When I tell this story to nontechical folks, I prefix it with the
> brief note that fgrep ought to be fastest, because it's simple, and
> egrep ought to be slowest, because it's complex, but in reality
> fgrep is slowest and egrep is fastest.
Is it really? The one time I used fgrep in production, I was checking
a a few hundred documents at a time to see which ones contained any of a
few thousand keywords. "fgrep -l -f keywords" seemed to do the job quite
quickly: would it really have been faster to assemble the keywords into
a single egrep regex and use egrep? (This was on Solaris, so using more
or less classic fgrep, not GNU grep.) For a while I referred to myself as
"just another desperate fgrep hacker".
I use "ex" as my normal text editor (including for this email); I drop
into vi mode occasionally, mostly to bounce on the % key when writing
Lisp. Because there is no support for | in ex regexes, I rely on the
low entropy of English text (about 2.7 bits per letter) and search
for e.g. "open|shut" by searching for "[os][ph][eu][nt]". I may
get a few false positives, but they will easily be removed by vgrep.
--
John Cowan http://www.ccil.org/~cowan cowan at ccil.org
After fixing the Y2K bug in an application:
WELCOME TO <censored>
DATE: MONDAK, JANUARK 1, 1900
next prev parent reply other threads:[~2016-01-31 17:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-30 3:00 Warren Toomey
2016-01-30 19:10 ` Mary Ann Horton
2016-01-30 19:44 ` Dave Horsfall
2016-01-30 20:20 ` Mary Ann Horton
2016-01-30 20:40 ` Dave Horsfall
2016-01-30 21:42 ` Marc Rochkind
2016-01-31 1:41 ` Dave Horsfall
2016-01-31 1:50 ` Larry McVoy
2016-01-31 2:06 ` jason-tuhs
2016-01-31 4:20 ` Random832
2016-01-31 17:11 ` Mary Ann Horton
2016-01-31 17:38 ` John Cowan [this message]
2016-02-01 10:48 ` Tony Finch
2016-01-31 2:37 ` John Cowan
2016-02-01 10:38 ` Tony Finch
2016-02-01 19:26 ` scj
2016-01-31 17:01 Doug McIlroy
2016-03-05 1:48 ` Dave Horsfall
2016-03-05 1:54 ` Larry McVoy
2016-02-01 20:57 Doug McIlroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160131173846.GB7792@mercury.ccil.org \
--to=cowan@mercury.ccil.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).