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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux