is one of UNIX's most useful tools. As a result, everyone
seems to want their own, slightly different version that solves a
different piece of the problem. (Maybe this is a problem in itself;
there really should be only one
, as the manual page says.)
Three versions of
come with every UNIX system; in addition,
there are six or seven freely available versions that we'll mention here,
and probably dozens of others that you can find kicking around the
Here are the different versions of
and what they offer.
We'll start with the standard versions:
: great for searching with regular expressions
): handles extended
regular expressions. It is also, arguably, the fastest of
. Actually, this is the
slowest of them all.
Useful to search for patterns with literal backslashes, asterisks,
and so on that you'd otherwise have to escape somehow.
Has the interesting
ability to search for multiple strings (articles
Now for the public domain versions:
, or "approximate
"; a tool that finds lines that
"more or less" match your search string.
A very interesting and useful tool, it's part of the
is an indexing and query system for fast searching of huge
amounts of text.
Both are introduced in article
Very fast versions of
, such as the Free Software
, which searches through
RCS files (
In addition, you can
simulate the action of
These utilities allow you to write such variations as a
that searches for a
pattern that can be split across several lines (
which show you a few lines before and after the
text you find.
s just show the lines that match.)