Autzoo.627 hacknews utzoo!henry Fri May 15 17:10:54 1981 fgrep vs grep vs egrep Following a comment made by Ron, I ran some timings on the three greps and uncovered some interesting things. fgrep "is fast and compact"; I have no doubt about the compact part, but on the example I used (grepping a single word out of several huge files) it is the SLOWEST of the three, almost a factor of two slower than egrep, which is the fastest. The difference between grep and egrep is not so large but is not zero. So egrep is actually the best to use for general work. A few reservations should accompany the above. First, it is indeed possible that fgrep is the fastest if one is searching for many possible words rather than only one. And egrep might run out of space on complex patterns that grep could cope with easily. Note also that egrep's patterns are significantly different from the familiar variety used by the editors, sed, and grep. And finally, you are unlikely to notice much of a difference between the greps on files of ordinary size.