Trying to get something to work here with the unix join command.
I have an IN.dat file (1st column is MSG ID and 2nd column is UNIX TIME):
6839944 1251732690
6839945 1251732709
6839946 1251732722
6839947 1251732722
6839948 1251732735
(etc)
I have an OUT.dat file:
6958611 1246807903
6958612 1246808006
6958613 1246808090
6958614 1246808115
6958615 1246808259
6958616 1246808337
6958617 1246808434
6958618 1246808548
The records in the 2 files may not necessary match.
I basically want 4 columns in a 3rd file as shown:
“IN MSG ID” “IN TIME” “OUT MSG ID” “OUT TIME” [if matching]
(none) (none) “OUT MSG ID” “OUT TIME” [if not matching]
“IN MSG ID” “IN TIME” (none) (none) [if not matching]
The following command seems to have worked for others but not me:
join -t “,” -a 1 -a 2 -e ‘(none)’ -o 0,1.2,2.2 IN.dat OUT.dat
Output I got:
6839944 1251732690,(none),(none)
6839945 1251732709,(none),(none)
6839946 1251732722,(none),(none)
6839947 1251732722,(none),(none)
6839948 1251732735,(none),(none)
6839949 1251732783,(none),(none)
6839950 1251732783,(none),(none)
6839951 1251732802,(none),(none)
6839952 1251732833,(none),(none)
6839953 1251732881,(none),(none)
6839954 1251732894,(none),(none)
6839955 1251732925,(none),(none)
6839956 1251732979,(none),(none)
6839957 1251733009,(none),(none)
“6839944 1251732690” (no comman??) seem to suggest that the command treats it as a single field instead of 2 fields?
Any idea what’s wrong?
TIA!