I tried the simple join
join query.txt source.tab
Based on 1st colum in both files. It’s clear that source.tab
contain the query. But why the operation yields no result?
Both of the query and source file is downloadable here:
http://dl.dropbox.com/u/11482318/query.txt (2B)
http://dl.dropbox.com/u/11482318/source.tab (40KB)
Tha man page for
joinsays that (as suggested by shelter):In your case the source.tab file is sorted naturally on the first field (r1.1, r2.1, etc.) But the sort order required by join would be based on the collating sequence of
sort(probably r1.1, r10.1, r100.1, r11.1, r12.1, etc.)If you sort your source.tab file using the
sortcommand, then join, it should work.(Note that – perhaps by luck – the query.txt file has the correct sort order.)