Re: sort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 10, 2003 at 10:47:00AM -0500, Bill Gradwohl wrote:
> I thought I knew how to run sort to get a plain ASCII sort, but apparently I don't.
> 
> I have a file full of random IP addresses, 1 per line. When I sort it with no options, I don't get a pure ASCII sort.
> 
> Here's an example file with just 3 lines:
> 12.37.89.3
> 128.52.23.9
> 12.96.86.83
> 
> Running sort on it with absolutely no options returns the same line order. i.e. cat file|sort
> 
> Editing the file and flipping lines 1 and 3 and then sorting again returns the original line order shown above, so sorting is going on, but its not what I was expecting. How can 128. sort between the two 12. items?
> 
> Anyone know what's going on here?
> 
> I tried -n and -g options but they don't provide an ASCII sort, and they mess up on the 3rd octet.
> 
> 
I am not sure what is going on in your system byut both sort and sort
-n on those three lines gives for me:
12.37.89.3
12.96.86.83
128.52.23.9

which looks ok to me. What did you want to see?
-- 
-------------------------------------------
Aaron Konstam
Computer Science
Trinity University
715 Stadium Dr.
San Antonio, TX 78212-7200

telephone: (210)-999-7484
email:akonstam@xxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux