in reply to Re^3: Joining two files on common field
in thread Joining two files on common field

Well.... If I type a few lines of each file out manually, the join works. Otherwise the join returns nothing. In vi I've used the set list to check for special character but there isn't any.
Any idea what could be causing the problem?
  • Comment on Re^4: Joining two files on common field

Replies are listed 'Best First'.
Re^5: Joining two files on common field
by davidrw (Prior) on Sep 23, 2005 at 12:47 UTC
    What is the exact join command that "returns nothing"? What do the the two files look like? As stated before, it's like a delimiter issue, or (the -1 and -2 options) you're not telling it which fields to join on (it assumes the first field of each file by default).
Re^5: Joining two files on common field
by ambrus (Abbot) on Sep 23, 2005 at 16:02 UTC

    This sounds like you might have carriage returns or extra whitespaces at line ends in (at least one of) the original files. That's just a guess of course.

    Update: you have to sort the lines (with the fields you want to join as keys) if you want to join the files. You didn't forget that, did you?