[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: join bug?
From: |
Bob Proulx |
Subject: |
Re: join bug? |
Date: |
Thu, 2 Feb 2006 23:23:55 -0700 |
User-agent: |
Mutt/1.5.9i |
german rigau wrote:
> Just in case this is really a bug...
Thanks for reporting the problem. But I believe the problem is in
your use of the command.
> Consider joining these two files ordered with default options:
>
> address@hidden BaseConcepts]$ more kk1.sort
> ice_cream%1:13:00::
> life_style%1:07:00::
> part-time%3:00:00::
> 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
sort --check kk2.sort
sort: kk2.sort:2: disorder: ice_cream%1:13:00:: 07510835 1 1
Files for join must be sorted.
> address@hidden BaseConcepts]$ join kk1.sort kk2.sort
> life_style%1:07:00:: 04875322 1 2
> part-time%3:00:00:: 01131371 1 21
> address@hidden BaseConcepts]$ join -v 1 kk1.sort kk2.sort
> ice_cream%1:13:00::
>
> Why ice_cream%1:13:00:: is not joined? Is this corrected in
> version 5.93 of coreutils?
Sort the files first and then all lines will be joined. Here is an
example of sorting on the fly using some bash specific extensions.
join <(sort kk1.sort) <(sort kk2.sort)
ice_cream%1:13:00:: 07510835 1 1
life_style%1:07:00:: 04875322 1 2
part-time%3:00:00:: 01131371 1 21
Bob
Re: join bug?,
Bob Proulx <=