Linux Foundation Xi.

Source: Internet
Author: User
Tags egrep

Position anchoring in 1.grep for specifying where characters appear     ^  anchor beginning,^char         $  Anchor Line end,char$        ^$  Blank line          \<char  Anchor Words First =\bchar        char\>   Anchor ending =char\b        grep group     \ ( \  )     \ (ab\) *xy   indicates AB appears any time, including 0 times          grep refers to the         \1  back reference, referencing the first opening parenthesis, and the corresponding pattern in the closing parenthesis.         \2        ...         \ (a.b\) xy\1  eg: abbxyabb         2.grep Common options     -v: Displays rows that cannot be matched to a pattern     - O: Show only strings that are matched to the pattern, not the     -i: case insensitive&NBSP;&NBSP;&NBSP;&NBSP;-E: Support for extended regular expressions     -A:    -B:     -C:        3.egrep  equivalent to grep -e     Using an extended regular expression to build a pattern is equivalent to grep -e        .  any single character          [ ]  any single character in the specified range          [ ^]  any single character          number of matches outside the specified range          *        ?         +: Matches the preceding character at least once         {m }  matches the preceding character m times         {m,n}  matches the preceding character at least m times, up to N times          {m,}  matches the preceding character at least m times         {0,n}  Matches the preceding character up to n times            position anchor          ^  beginning of    egrep           $  End of Line          \<  = \b  Anchor word          \> = \b  anchor ending                egrep Group             ()   Grouping             |   or            4.fgrep :  fast  non-analytic regular expression 5.bash programming condition judgment      condition judgment common judgment type           Integer test          file Test          Character Testing                 $?             0     indicates that the test is correct              1-255     indicates errors                       Boolean   (True, false)           Logic Operations               with              or               Non-                  6.bash Test     test EXPRESSION             [EXPRESSION]         [[expresstion]]        7.bash the condition to judge using if     Single Branch &NBSP;&NBSP;&NBSP;&NBSP;&Nbsp;   if  condition; then              Branch 1 ;        fi              Dual Branch         if  condition; then              Branch 1 ;         else             Branch 2 ;         fi                    Multi-branch          if  conditions;  then              Branch 1 ;          elif               Branch 2&NBSP;;          elif               Branch 3 ;         ...          else               Branch N ;         fi

Linux Foundation Xi.

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.