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.