美文网首页
Build-in Variables And Operators

Build-in Variables And Operators

作者: cutelittlePanda | 来源:发表于2018-03-28 20:37 被阅读0次

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

      本文链接:https://www.haomeiwen.com/subject/wvauqftx.html