GNU bug report logs - #6903
join: support numeric keys

Previous Next

Package: coreutils;

Reported by: Bernhard Schiffner <bernhard <at> schiffner-limbach.de>

Date: Tue, 24 Aug 2010 19:57:01 UTC

Severity: wishlist

Full log


Message #8 received at 6903 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Bernhard Schiffner <bernhard <at> schiffner-limbach.de>
Cc: 6903 <at> debbugs.gnu.org
Subject: Re: bug#6903: join: improve paralleles to sort?
Date: Tue, 24 Aug 2010 14:23:55 -0700
On 08/24/2010 12:39 PM, Bernhard Schiffner wrote:
> Because join uses strtoul() before doing comparisation it is understandable. 
> ("unpairable" is the result.)

No, join doesn't use strtoul.  It compares the numbers as strings.
So if you use plain "sort" on the numbers, join will work, unless the
numbers are numerically equal but textually different (e.g., 0 versus -0).
You can then sort the output of join with "sort -n", if you wish.

> Do you see a chance to extend join with a -n parameter for numeric 
> comparisation as sort has already?

That would be a nice thing to add, if someone had the time to do it.
Generally speaking, any comparison that "sort" can do, "join" should
do too (except for random comparison I suppose).

The comparison code between sort and join should be shared, of course.
Can you write that?




This bug report was last modified 6 years and 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.