Sort a list of IP addresses!

Ive been in need of this for a while now! Use the following sort command to properly sort a list of IP addresses:

sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4

Leave a Reply

Your email address will not be published. Required fields are marked *