LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] grep, egrep, fgrep

[ILUG] grep, egrep, fgrep

John McCormac jmcc at hackwatch.com
Fri Feb 2 15:35:11 GMT 2001


On Fri, 2 Feb 2001, Niall O Broin wrote:

> Can anyone shed any light on why the above, at least on SuSE 6.4, are
> entirely separate programs ? As egrep is e.g functionally identical to grep
> -E and the man page for grep says

There are some differences according to the Mastering Regular Expressions
book (Page 63). The egrep prog allows for word boundaries (\< \>) though
grep seems to support backreferences but egrep does not. 

It seems that while they may be functionally equivalent, they implement
the functions in a different manner. The grouping in grep seems to be \(\)
but in egrep it is (). Having to escape some characters in grep but not in
egrep could lead to very different results if the same string was tried on
both. 
 
> This anomalous behaviour has just cost me a couple of blank CDs and more
> important, a couple of hours, so I'm pissed ! (Yes, I know it's my fault for
> making unjustified assumptions, but I'm still pissed !)

I bought PC Plus hoping to get Suse on DVD and it turns out to be a
frigging ISO and I have no CD Writer at the mo. I almost know how you
feel. :-)

Regards...jmcc





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell