[PLUG] Sort numbers in 'natural' order
Roderick A Anderson
raanders42 at gmail.com
Sun May 31 18:05:55 UTC 2015
Well I didn't think it up my self so I had to look it up again.
http://larsmichelsen.com/open-source/quickie-sort-ip-addresses-on-linux-command-line-bash/
Rod
--
On May 31, 2015 10:55:44 AM Rich Shepard <rshepard at appl-ecosys.com> wrote:
> On Sun, 31 May 2015, Roderick Anderson wrote:
>
> > 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,
>
> Thanks! That does the trick. I don't understand the keydefs, but as long
> as it does the job I'll take it on faith. :-)
>
> Much appreciated,
>
> Rich
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
More information about the PLUG
mailing list