Fortune Telling Collection - Comprehensive fortune-telling - What is the explanation of the awk command?

What is the explanation of the awk command?

Awk: used to divide a line into several fields for processing. Suitable for handling small data.

Operation mode: awk "condition type 1{ operation 1} condition type 2{ operation 2} ..." file name.

# last | awk“{ print $ 1 " \ t " $ 3 }”& lt; = = View the data of the recorder, and only display the login name and ip address, separated by [tab].

Awk's built-in variables.

What the variable name represents.

Total number of fields per NF line ($0)

What line of data is awk currently processing?

FS current delimiter, default space bar

Awk's logical operator

trait

AWK is an excellent text processing tool. Is this unfair? Linux? It is also one of the most powerful data processing engines in any environment. The greatest function of this programming and data processing language (named after its founders Alfred Aho, peter weinberger and Brian Koenigan) depends on the knowledge one has. AWK provides extremely powerful functions: style loading, flow control, mathematical operators, process control statements and even built-in variables and functions can be executed.