Need help with sort command

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

Hope this helps:

sort -n -t"." -k4 match.txt

Absolutely fine....:b:

Thank u so much for ur kind help n ur time..:slight_smile: