Difference grep, egrep and fgrep

Hi All,

Can anyone please explain me the difference between grep, egrep and fgrep with examples.

I am new to unix environment.. Your help is highly appreciated.

Regards,
ravi

See man page

man grep fgrep egrep

gerp Search a Pa tern from current directory.

egrep (grep -E in linux) is extended grep where additional regular expression metacharacters have been added like +, ?, | and ().

fgrep (grep -F in linux) is fixed or fast grep and behaves as grep but does not recognise any regular expression metacharacters as being special.

1 Like