[PLUG] Sort numbers in 'natural' order
Roderick Anderson
raanders42 at gmail.com
Sun May 31 17:46:11 UTC 2015
Rich,
I think this is the solution. Been a long time since I looked at the
(very long pipe) script it was in so YMMV.
sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n
Rod
--
On 05/31/2015 10:25 AM, Rich Shepard wrote:
> Thought I found the correct option for sorting CIDR IP addresses, but
> apparently haven't.
>
> Using -g (general sort), -h (human readable sort), and -n (numeric sort)
> all leave xxx.11 following xxx.100. I thought one of these would put them in
> the same order as would us carbon forms.
>
> Is there such an option to sort that I've missed?
>
> Rich
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
More information about the PLUG
mailing list