[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sort -t. -n
From: |
Jim Meyering |
Subject: |
Re: sort -t. -n |
Date: |
Thu, 05 Feb 2004 09:14:23 +0100 |
> I tried this:
>
> cat list.txt | \
> env LANG=C sort -t. -k1n -k2n -k3n -k4n
>
> But the result is incorrectly sorted:
...
> 10.225.101.125
> 10.81.90.165
That's the expected behavior, because of the way you specified the keys.
This should do what you want:
env LANG=C sort -t. -k1,1n -k2,2n -k3,3n -k4,4n
- sort -t. -n, Charles R. Anderson, 2004/02/05
- Re: sort -t. -n,
Jim Meyering <=