I have a file1 with 3 columns and file2 with 4 columns. How do I join the two files based on the string in column 3 of file1 to the string in column 2 of file2. File2 is a large db with many entries. Column 3 and 2of file1 and file2 respectively share only few strings. I would like to output file1 with joined file2 rows incase the strings match and output a dash for entries with no matches.Thanx
file1
300 100 a101
450 410 a400
670 710 a20
700 610 a340
file2
b30  a340 tttttttt 456
b500 a200 llllllll 567
b60  a101 uuuuuuuu 344
b40  a50  kkkkkkkk 223
output
300 100 a101 b60 a101 uuuuuuuu 344
450 410 a400 -
670 710 a20  -
700 610 a340 b30 a340 tttttttt 456