Home > OS >  Awk a strange error, who to see
Awk a strange error, who to see

Time:11-29

Netstat -i | awk 'NF> 1 {print $1, $NF, $(NF) and $(NF - 2), $(NF - 3) and $(NF - 4)}
' awk: (FILENAME=- FNR=1) fatal: attempt to access the field - 1

Add the error on the NF - 4, NF - 3 can be

Netstat -i
Iface MTU Met RX - OK RX - ERR RX - DRP RX - OVR TX - OK TX - ERR TX - DRP TX - OVR Flg
Docker0 1500 7 0 0 0 0 0 0 0 0 BMRU
Eth4 1500 4318509903 0 0 0 0 0 0 0 BMRU 5362062571
Lo, 65536 50962963 50962963 0 0 0 0 0 0 LRU
Tunl0 1480 0 0 0 0 0 0 0 0 0 ORU
Veth7098e87 1500 0 0 0 0 0 0 0 9 7 BMRU
  • Related