soffcec
asked on
Sort list of IP addresses
I need a windows command line program who can sort a list of ip addresses
Normal sort does not do it right.
10.0.10.1
10.0.10.101
10.0.10.16
10.0.10.29
10.0.10.3
10.0.10.30
10.0.10.7
10.0.100.1
10.0.100.100
10.0.100.11
10.0.100.222
192.168.0.20
192.168.0.23
192.168.0.3
192.168.1.1
192.168.1.101
192.168.1.254
192.168.1.33
It should be like this:
10.0.10.1
10.0.10.3
10.0.10.7
10.0.10.16
10.0.10.29
10.0.10.30
10.0.10.101
10.0.100.1
10.0.100.11
10.0.100.100
10.0.100.222
192.168.0.3
192.168.0.20
192.168.0.23
192.168.1.1
192.168.1.33
192.168.1.101
192.168.1.254
Normal sort does not do it right.
10.0.10.1
10.0.10.101
10.0.10.16
10.0.10.29
10.0.10.3
10.0.10.30
10.0.10.7
10.0.100.1
10.0.100.100
10.0.100.11
10.0.100.222
192.168.0.20
192.168.0.23
192.168.0.3
192.168.1.1
192.168.1.101
192.168.1.254
192.168.1.33
It should be like this:
10.0.10.1
10.0.10.3
10.0.10.7
10.0.10.16
10.0.10.29
10.0.10.30
10.0.10.101
10.0.100.1
10.0.100.11
10.0.100.100
10.0.100.222
192.168.0.3
192.168.0.20
192.168.0.23
192.168.1.1
192.168.1.33
192.168.1.101
192.168.1.254
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
EE expert oBdA has provided a solution for this at https://www.experts-exchange.com/questions/28688008/Batch-IP-Address-sorting.html
Lol. Stuck in Excel mode
ASKER
Well I am looking for command line program like dir but who sort the addresses in right order.
Did you look at netcmh's comment?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for the grade. Good luck.