greg, egrep, fgrep, what's the difference

greg, egrep, fgrep, what's the difference

Posted 04/02/2009 - 14:49 by Webmaster

Problem: 

When running a grep command there are multiple varieties, which one should I use?

Solution: 

There are three versions of the grep command:

Command Functionality
grep basic regular expressions
egrep uses extended regular expressions slowest
fgrep no regular expressions fastest

When working with smaller files, the time may be negligible, however, in all cases egrep is considered the slowest overall.