Quote:
Originally Posted by matrixmadhan
Why do you need egrep when only a single pattern is specified in the regex ? 
|
Matrixmadhan,
Thanks for verifying my solution.
You are right about it -- for this specific case, I don't really need 'egrep'.
Matrix, I have a habit of always use 'egrep' no matter what.
This comes from the fact that I have had problems trying to use some full
regular expressions with 'grep' -- I had to specify the '-E' option.
Sometimes I found that out after a long headache.
From my last disaster, I promise myself to never use 'grep' again, always 'egrep'.
Matrix, also to reinforce my idea, all three versions of 'grep' in my system all have the same hardlink:
Code:
>ls -li grep egrep fgrep
329785 -r-xr-xr-x 7 root bin 22.1K Apr 12 09:11 egrep
329785 -r-xr-xr-x 7 root bin 22.1K Apr 12 09:11 fgrep
329785 -r-xr-xr-x 7 root bin 22.1K Apr 12 09:11 grep
Which leads me to believe that they are all the same program.
Hope to have answered your question.
Cheers.
