I have a list of subnets for eg.
180.151.96.0/22
180.151.240.0/21
119.82.112.0/22
203.122.29.0/24
203.122.48.0/22
119.82.92.0/24
180.151.108.0/23
119.82.124.0/24
119.82.89.0/24
180.151.17.0/24
119.82.85.0/24
203.92.59.0/24
125.63.90.0/24
180.151.2.0/24
125.63.126.0/24
The output of these after using sort -n
or sort -g
is
119.82.112.0/22
119.82.124.0/24
119.82.85.0/24
119.82.89.0/24
119.82.92.0/24
125.63.126.0/24
125.63.90.0/24
180.151.108.0/23
180.151.17.0/24
180.151.2.0/24
180.151.240.0/21
180.151.96.0/22
203.122.29.0/24
203.122.48.0/22
203.92.59.0/24
I need the output as
119.82.85.0/24
119.82.89.0/24
119.82.92.0/24
119.82.112.0/22
119.82.124.0/24
125.63.90.0/24
125.63.126.0/24
180.151.2.0/24
180.151.17.0/24
180.151.96.0/22
180.151.108.0/23
180.151.240.0/21
203.92.59.0/24
203.122.29.0/24
203.122.48.0/22
Such output is only possible using Notepad++ feature 'Sort Lines as Integers Ascending'
Can someone please help :)