Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Joining two files on common field

by davidrw (Prior)
on Sep 23, 2005 at 02:08 UTC ( [id://494370]=note: print w/replies, xml ) Need Help??


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

what were your attempts? I got nothing at first because i didn't specifiy the comma delimiter with -t (default is tab)... what i posted above worked and that was the actual output... worth a quick glance of the man page in case the params are slightly different for your system?
  • Comment on Re^3: Joining two files on common field

Replies are listed 'Best First'.
Re^4: Joining two files on common field
by ch1 (Novice) on Sep 23, 2005 at 04:57 UTC
    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?
      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).

      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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://494370]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found