Get the App
SLTechnology News&Howtos  ›  Servers  › 

Related cases of awk, the boss of the three Musketeers

Shulou Source: shulou.com Published: 2022-06-02 15:06:28 11月10日 Update

awk {} curly brackets inside is action, outside is condition

NR==(number record)

If you do not enter numbers, default to all rows

2. Select columns---If you want to separate columns, add ", or other symbols"

Display oldboy.txt row 4 column 1 column 2 and column 4 awk default space is a separator, so the fourth column after together, a character default is a knife, unless added +,[]+ into the whole

The case first specifies the separator as space and comma-F"[ ,]", one symbol is equivalent to one knife

Remove IP address

Compare sizes

NF is the last column.

Check disk usage Both numbers and percent signs are not recognized

Tags: Symbol number space case between usage action address size character parenthesis whole condition percentage percent disk comma input three Musketeers boss Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL MariaDB Microsoft Huawei NVidia