Subject: Bug in Join

From: CDR <[email-masked]>
Date: Mon, 12 Aug 2013 12:13:35 -0400

Dear Friends

The option -a 1 or -a 2 is not correct.
Suppose you have two comma separated value files with 10 records each,
joined on the first column. The second file has 6 records where there is no
match on the joining column (first).
Let's call the files today.txt and yesterday.txt

If you use this command
"join -t, -1 1 -2 1 -a 2 -o 2.1 today.txt yesterday.txt" it should give
ONLY the non pairing lines from yesterday. Instead, it prints all the lines
from yesterday.

I am copying here the contents of both files.

cat today.txt
2012054455,8624520081,6529,0,201
2012067075,2013106025,6214,0,201
2012087388,8623689800,6214,2,201
2012088887,8623689800,6214,0,201
2012120319,9739789996,392A,0,201
2012121177,9739789996,392A,0,201
2012122869,2013700000,6006,0,201
2012140209,2013700000,6006,0,201
2012143002,2012339982,6529,0,201
2012149116,2012339982,6529,0,201

 cat yesterday.txt
2012067075,2019269533,6664,0,201
2012087388,2012320000,6006,0,201
2012088887,8624520081,6529,0,201
2012140209,9733360000,392A,0,201
2012204272,2019269533,6664,0,201
2012226151,2018209998,954F,0,201
2012299682,2018209998,954F,0,201
2012324322,9733360000,392A,0,201
2012334444,2017809469,6664,0,201
2012389608,2012320000,6006,0,201