I want the resulting file to be reconds in FILE 2 where the person exists in FILE 1. ex:
joe,blow,29,53,25
jane,dow,50,50,20
I've tried using join -t, -j1 1 -j1 2 -j2 1 -j2 2 -o "2.1 2.2 2.3 2.4 2.5" FILE1 FILE 2 but it seems to only give me the first record matched (joe,blow,29,53,25). I expect the number of records in the resulting file to be the same as that of FILE 1.
Any help would be appreciated to resolve my problem.
Thanks,
Marcel Sammut
I've figured out how to use the join command for this task. Turns out join only works on one column key. So I had to concatenate the "first name" with the "last name" (i.e.: joe|blow,29,53,25 - where i used pipe to seperate the two keys).
With the use of cut and paste commands, I managed to get what I wanted.
I did try the posted suggestions, however, my application is a bit more complicated than my sample files.