GNU bug report logs -
#6903
join: support numeric keys
Previous Next
Full log
Message #8 received at 6903 <at> debbugs.gnu.org (full text, mbox):
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.