Re: fgrep,grep and egrep

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

 



On 06/08/2010 12:40 PM, Kaushal Shriyan wrote:
> Hi,
> 
> can someone explain me about the usage of grep , fgrep and egrep
> with examples.
> In what contexts i should use which.

The grep man page explains it well enough:

>        In addition, two variant programs egrep and fgrep are available.  egrep is the same as grep -E.  fgrep is the same as grep -F.  Direct
>        invocation  as  either  egrep  or  fgrep  is  deprecated,  but  is  provided to allow historical applications that rely on them to run
>        unmodified.

>        -E, --extended-regexp
>               Interpret PATTERN as an extended regular expression (ERE, see below).  (-E is specified by POSIX.)
> 
>        -F, --fixed-strings
>               Interpret  PATTERN  as  a  list  of  fixed  strings, separated by newlines, any of which is to be matched.  (-F is specified by
>               POSIX.)

When in doubt, RTFM.

> Please guide/suggest
> 
> Thanks and Regards,
> 
> Kaushal

-- 
Kevin J. Cummings
kjchome@xxxxxxx
cummings@xxxxxxxxxxxxxxxxxx
cummings@xxxxxxxxxxxxxxxxxxxxxxx
Registered Linux User #1232 (http://counter.li.org)
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux