Regular expressions and three Musketeers-2
Awk
Take a paragraph (column) and will not change the contents of the saved file
1. Option
-F specifies the delimiter, and the default space is the delimiter
two。 Printout matching lines
1) commands similar to sed
2) match the key words in one or more columns and print the corresponding rows
3) matching rows (matching rows), printing all columns of matching rows
4) eligible rows (matching rows), printing some columns of matching rows
3. Print some columns of all rows
1) print all columns in all rows, and $0 represents all columns
2) print multiple columns in all rows, separated by commas between columns in the format
3) define the delimiter
4. Print some columns in the matching row
5. Built-in variables for awk
1) NF represents the number of columns of rows
2) NR indicates the line number
6. Add up a column of all the lines in the file