[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: join bug?
From: |
german rigau |
Subject: |
Re: join bug? |
Date: |
Fri, 3 Feb 2006 17:31:24 +0100 |
On 2/3/06, Paul Eggert <address@hidden> wrote:
>
> german rigau <address@hidden> writes:
>
> > address@hidden BaseConcepts]$ more kk2.sort
> > icecream%1:13:00:: 07510835 1 0
> > ice_cream%1:13:00:: 07510835 1 1
> > life_style%1:07:00:: 04875322 1 2
> > part-time%3:00:00:: 01131371 1 21
>
> kk2.sort isn't sorted correctly, at least not for the default C
> locale. The first two lines ought to be interchanged. That probably
> explains your problem. 'join' requires sorted input.
>
>
Obviously, the problem is in the sort command. With C locale
runs perfectly. However, I use LANG=en_US.UTF-8 ...
And then it seems that the "sort" command have different behaviour ...
address@hidden BaseConcepts]$ export LANG=C
address@hidden BaseConcepts]$ sort kk2
ice_cream%1:13:00:: 07510835 1 1
icecream%1:13:00:: 07510835 1 0
life_style%1:07:00:: 04875322 1 2
part-time%3:00:00:: 01131371 1 21
address@hidden BaseConcepts]$ sort -k 1,2 kk2
ice_cream%1:13:00:: 07510835 1 1
icecream%1:13:00:: 07510835 1 0
life_style%1:07:00:: 04875322 1 2
part-time%3:00:00:: 01131371 1 21
address@hidden BaseConcepts]$ export LANG=en_US.UTF-8
address@hidden BaseConcepts]$ sort kk2
icecream%1:13:00:: 07510835 1 0
ice_cream%1:13:00:: 07510835 1 1
life_style%1:07:00:: 04875322 1 2
part-time%3:00:00:: 01131371 1 21
address@hidden BaseConcepts]$ sort -k 1,2 kk2
ice_cream%1:13:00:: 07510835 1 1
icecream%1:13:00:: 07510835 1 0
life_style%1:07:00:: 04875322 1 2
part-time%3:00:00:: 01131371 1 21
Best,
German
Re: join bug?, Bob Proulx, 2006/02/03