Build-in Variables And Operators

Variables:    https://www.tutorialspoint.com/awk/awk_built_in_variables.htm

Operators:      https://www.tutorialspoint.com/awk/awk_operators.htm

Regular Expression in AWK

1. Match

## ~  ===pronunced as===> 'Tilde'  

### N, strings ===read as===> regular expression constant

For numbers:

$ awk '$0 ~ N'  filename   ### to print out the lines in filename which contains the number N;

$ awk '$0 ~ /strings/' filename  ### to print out the lines in file which including strings specified;

2. Not Match:  using ' !~ ' to replace ' ~ ' 

    Ref: https://www.tutorialspoint.com/awk/awk_regular_expression_operators.htm

你可能感兴趣的:(Build-in Variables And Operators)