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

Re: Possible bug in 'sort -m'



On Tue, Mar 13, 2007 at 03:34:25PM -0700, Bob McGowan wrote:
[..] 
>   sort -m from_number to_number | uniq | wc -l
>   122010
> 
> This is still almost 12000 too big (only 17 less than the 'uniq' on the 
> separate files).  So, I run this:
> 
>   sort -u from_number to_number | wc -l
> 
> And I get 110256, the same number as the SQL UNION gave me.
> 
> So, if both files are sorted and I then use 'sort -m' followed by 'uniq' 
> and count the results, shouldn't I get the same thing as resorting the 
> two (already sorted) files with sort's '-u' option and counting that output?
> 
> I did wonder if I needed to use '-n' with the '-m', but that didn't fix 
> anything, in fact, I got a different count:  121995.
> 
> Am I missing something obvious, having to do with numbers and merging? 
> Or is this a bug in sort?
> 
> Thanks for your patience with the long post ;}

I remember reading a post by "Frans Pop", about this _sort_ of thing. :-)

I can't remember the exact list, but maybe a "site: lists.debian.org" on
google may _sort_ it out. 


-- 
Chris.
======
Don't forget to check that your /etc/apt/sources.lst entries point to 
etch and not testing, otherwise you may end up with a broken system once
etch goes stable.



Reply to: