bugGNU Core Utilities - Bugs: bug #21163, join stops on numeric field if...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #21163: join stops on numeric field if last number before double-digit is missing

Submitted by:  None
Submitted on:  Wed 26 Sep 2007 06:52:50 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 26 Sep 2007 07:13:53 PM UTC, comment #1:

Thanks for the report, but this isn't a bug.
Join requires that its inputs be sorted, and yours are not.
Compare with the output of sort (without -n).

Jim Meyering <meyering>
Project Administrator
Wed 26 Sep 2007 06:52:50 PM UTC, original submission:

tested with coreutils-5.2.1-31.4 on RHEL4, coreutils-5.97-12.1.el5 on RHEL5

Looks likes join terminates when joining on a numeric field if the last n-digit number before the n+1-digit number is missing, e.g. I have 2 sorted files with numbers 1-2000 (and then some data in other fiels). If in one file the line with "999 some data" is missing, the join output will stop at the line before. If instead the "998 some other data" line is missing, join's output continues as expected.

# cat a (sequence)
7
8
9
10
11
12
# cat b (sequence with 9 missing)
7
8
10
11
12
# cat c (sequence with 8 missing)
7
9
10
11
12

# join a b
7
8
<--- where's the rest?
# join a c
7
9
10
11
12

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by meyering (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 26 Sep 2007 07:13:53 PM UTCmeyeringStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1