[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Should have used egrep



>>>>>> "Stephen" == Stephen Masterman <floyd@animals.mit.edu> writes:
>
>  Stephen> I guess I should use egrep!
>
>I don't know if it is true for current implementations but one of the
>curiosities of early implementations of egrep was that, even though
>it is more general than grep, it was usually faster than grep on
>problems where they could both be used.

Well, under Debian we use GNU's version of the grep programs, and:

richard@sfere:richard$ ls -li /usr/bin/*grep
  66907 -rwxrwxr-x   3 root     root        61444 Mar 24  1995 /usr/bin/egrep
  66907 -rwxrwxr-x   3 root     root        61444 Mar 24  1995 /usr/bin/fgrep
  66907 -rwxrwxr-x   3 root     root        61444 Mar 24  1995 /usr/bin/grep
  66825 -rwxrwxr-x   1 root     root         1335 Mar 24  1995 /usr/bin/zgrep
richard@sfere:richard$ 

...they're all the same file.  So they perform identically, the syntax
is just slightly different (RTFM for more information).  I would be
unsurprised if commerical UNIX implementations still have the
properties you describe, however.

-- 
Richard Kettlewell
richard@elmail.co.uk                    http://www.elmail.co.uk/staff/richard/



Reply to: