Linux egrep Commands

Source: Internet
Author: User
Tags egrep

The Linux egrep command is used to find the specified string within a file.

Egrep execution effect is similar to "GREP-E", the syntax and parameters used can refer to the GREP directive, and the difference between grep is the method of interpreting the string.

Egrep is interpreted with extended regular expression syntax, while grep is interpreted with the basic regular expression syntax, extended regular expression than basic Regular expression is more canonical.

+:o+ stands for 1 or more O

? : O? Represents an empty or 1 O

|:egrep-n ' Gd|good ' data.txt find GD and good strings

(): Egrep-n ' G (la|oo) d ' data.txt find glad or good

() +:egrep ' A (xyz) +c ' Find a start, C ends with one or more xyz in the middle

Linux egrep Commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.