Hi i have a file containing ip addresses and want to sort those IP addresses in the ascending order.
file (match.txt) contents are:
192.168.0.100
192.168.0.16
192.168.0.10
192.168.0.23
192.168.0.2
192.168.0.3
192.168.0.1
192.168.0.222
i tried:
sort -n match.txt
output is :
192.168.0.1
192.168.0.10
192.168.0.100
192.168.0.16
192.168.0.2
192.168.0.23
192.168.0.222
192.168.0.3
but it should be:
192.168.0.1
192.168.0.2
192.168.0.3
192.168.0.10
192.168.0.16
192.168.0.23
192.168.0.100
192.168.0.222
Any help would be appreciated..
Thanks
Manmeet