Re: join not joining more then 9 lines

From: Green, Simon (Simon.Green_at_EU.ALTRIA.COM)
Date: 10/26/04

  • Next message: Andrew Townsend: "Re: join not joining more then 9 lines"
    Date:         Tue, 26 Oct 2004 18:13:17 +0200
    To: aix-l@Princeton.EDU
    
    

    I think the problem is that join assumes alphabetic, not numeric sequence.
    So "10" is less than "9" and it gives up in disgust. The man page for join
    would suggest that you need to do a normal sort - just sort, or sort -b -
    before you do your join. If you need it in numeric order, do a sort -n on
    the result.

    --
    Simon Green
    Altria ITSC Europe Ltd
    AIX-L Archive at https://new-lists.princeton.edu/listserv/aix-l.html
    New to AIX? http://publib-b.boulder.ibm.com/redbooks.nsf/portals/UNIX
    N.B. Unsolicited email from vendors will not be appreciated.
    Please post all follow-ups to the list.
    > -----Original Message-----
    > From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On
    > Behalf Of Andrew Townsend
    > Sent: 26 October 2004 15:46
    > To: aix-l@Princeton.EDU
    > Subject: Re: join not joining more then 9 lines
    >
    >
    > I try to join 2 files but join will only join the first 9
    > lines. The two
    > files I am trying to join are:
    >
    > # cat tot-data-BU.041025
    >      1  Backedup
    >      2  0.647
    >      3  0.756
    >      4  1.576
    >      5  2.191
    >      6  2.560
    >      7  3.300
    >      8  3.770
    >      9  4.629
    >     10  5.024
    >     11  5.887
    >     12  6.783
    >     13  7.386
    >     14  7.953
    >     15  8.533
    >
    > and
    >
    > #cat tot-data-RES.041025
    >      1  Restored
    >      2  0.0
    >      3  0.0
    >      4  0.0
    >      5  0.0051
    >      6  0.0051
    >      7  0.0051
    >      8  0.0051
    >      9  0.0101
    >     10  0.0101
    >     11  0.0101
    >     12  0.0101
    >     13  0.0101
    >     14  0.0101
    >     15  0.0101
    >
    > when I do a      join tot-data-BU.041025  tot-data-RES.041025
    > I get:
    >
    > 1 Backedup Restored
    > 2 0.647 0.0
    > 3 0.756 0.0
    > 4 1.576 0.0
    > 5 2.191 0.0051
    > 6 2.560 0.0051
    > 7 3.300 0.0051
    > 8 3.770 0.0051
    > 9 4.629 0.0101
    >
    > Only 9 lines! Is this a limitation of join, or is it something with my
    > output?
    

  • Next message: Andrew Townsend: "Re: join not joining more then 9 lines"

    Relevant Pages

    • Sorting order to include alpha numeric
      ... I am having trouble sorting alpha numeric text consecutively on an excel spread sheet. ... I'm only using the first column & the number for the "Sort By" ... 10010-A [these next numbers with -alpha relocate to bottom of numeric sequence] ...
      (microsoft.public.excel)
    • Re: What good can FreeBSD do? (in the presence of OpenBSD)
      ... following sort: ... I've attended what was supposed to be a lecture by that guy, ... up walking away in disgust. ...
      (comp.unix.bsd.freebsd.misc)
    • Re: Egalitarian Orthodoxy
      ... so they must be nuts" rather than some sort ... I agree that it's not only religious dogma, as it seems every culture ... because there *is* that degree of disgust. ... was considered incest (It got changed in the last Victorian ...
      (soc.culture.jewish.moderated)
    • Re: What good can FreeBSD do? (in the presence of OpenBSD)
      ... following sort: ... I've attended what was supposed to be a lecture by that guy, ... up walking away in disgust. ...
      (comp.unix.bsd.freebsd.misc)
    • Re: Another one bites the dust
      ... A friend of mine had this sort of problem. ... and threw away his cordless mouse in disgust. ...
      (rec.gambling.poker)