Shell(11)——awk(1)

Awk can process files by column, not only by rows like sed.
Format: awk parameter'action' The file to be processed
(1) The
Insert picture description here
first and fourth columns of the print column are printed out, and we can not Print and splice in order:
Insert picture description here

(2) Print the line number.
We can use the built-in parameter NR
<1> to be used in {}
Insert picture description here
Insert picture description here
ps: $0 means to display the content of all lines
<2> to be used outside {}
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_48445640/article/details/109201422