Cut:-d specify delimiter default is space, eg: cut-d:-f take out the specified segment eg: cut-f2, 7, 8eg: tail-1etcpasswd | cut-d:-f1, 3, 4, grep: grep [options] PATTERN (mode) file... parameter:-I is not case sensitive-v search reverse display, that is, unmatched display-n shows matched rows in the file Cut:
-D: The default Delimiter is space. For example: cut-d:
-F extracts the specified segment eg: cut-f2, 7,8
Eg: tail-1/etc/ Passwd| Cut-d:-f1, 3,4
Grep:
Grep [options] PATTERN (Mode) File...
Parameters:
-I is case insensitive.
-V reverse display of search, that is, mismatch display
-N: displays the row number of the matched row in the file.
-An matches the last n rows of a row
-Bn: match the first n rows of a row
-Cn matches n rows before and after the row
-- ColOr highlighted
-E = EgrepExtended grep
Mode:
^ Match the beginning of a row
$ Matching at the end of a row
. Match any single character
* Used to match the previous character 0 or multiple times
?
[] Match any one of the groups
[^] Inverse
\ <词首定位符
\> The word is a positioning character.
X \ {m, n \} x characters appear between m and n times
Regular ExpressionExpression, metacharacters
1. Basic Regular Expression
2. Extended Regular Expressions
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