[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in join
From: |
Jim Meyering |
Subject: |
Re: bug in join |
Date: |
Wed, 26 Feb 2003 15:13:37 +0100 |
"Haidong Wang" <address@hidden> wrote:
> With following two simple files:
>
> test1:
> a f
> b h
> c g
>
> test2:
> 1 b
> 2 g
> c 6
>
> join -j 2 test1 test2
>
> gives the wrong result which is nothing.
>
> The correct result should be:
> G c 2
Thank you for the report, but that is not a bug.
The input files must be sorted on the respective fields
used to perform the join operation, and neither of those
files is properly sorted.
Since I see you've used a TAB to separate the fields,
you should sort each of those files using `sort -k2,2b'.
Then your command would produce this output:
g c 2
- bug in join, Haidong Wang, 2003/02/26
- Re: bug in join,
Jim Meyering <=