Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Regular expressions and three Musketeers-2

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report