Why fgrep?

Rahul Dhesi dhesi at bsu-cs.UUCP
Fri Dec 9 07:24:35 AEST 1988


In article <1050 at naucse.UUCP> sbw at naucse.UUCP (Steve Wampler) writes:
>In every machine I've played with, fgrep has never
>performed better than plain old grep for any data I've given
>it (and on some machines, it is *considerably* slower).

It performs well if you have a large number of strings to look for.
For example:

     cat longfile | fgrep -f stoplist | other_stuff

In one experiment on a VAX-11/785 (4.3BSD), with 470 entries in
'longfile' and 20 search strings in 'stoplist', fgrep did it in 2
seconds real time while egrep took 10.  User/system cpu times were
correspondingly different.
-- 
Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee}!bsu-cs!dhesi



More information about the Comp.unix.questions mailing list