In bash shell I'm trying to sort by a numeric value at the end of each line (sort by number of packets)
Tried to use "sort -k6 -t '=' -n
but not working.
Input:
type udp ip src=192.168.2.173 dport=53 packets=1
type udp ip src=192.168.2.168 dport=53 packets=1
type udp ip src=192.168.2.173 dport=53 packets=1
type udp ip src=192.168.2.170 dport=53 packets=560
type udp ip src=192.168.2.173 dport=53 packets=1
type udp ip src=192.168.2.175 dport=53 packets=1
type udp ip src=192.168.2.173 dport=53 packets=11
type udp ip src=192.168.2.178 dport=53 packets=1
type udp ip src=192.168.2.162 dport=53 packets=23
type udp ip src=192.168.2.173 dport=53 packets=75
type udp ip src=192.168.2.173 dport=53 packets=7
type udp ip src=192.168.2.173 dport=53 packets=100
type udp ip src=192.168.2.173 dport=53 packets=1
type udp ip src=192.168.2.173 dport=53 packets=200
type udp ip src=192.168.2.162 dport=7777 packets=75