From a mailing list:
>Does anyone have a script that sorts IPv4 addresses? >I've tried all sorts of tricks with "sort -n -k" etc, but can't seem to get it right. With an older sort: sort -t'.' -n -k1,1 -k2,2 -k3,3 -k4,4 With modern GNU sort, a "version syntax" sort is available: sort -V
And something else:
the canonical "sort | uniq -c | sort -nr" so beloved of admins everywhere