On 14/02/11 23:45, Batson, Brannon wrote: > > File a: > 10 A > 1 B > > File b: > 1 > > $ join b a > <nada> > > $ join -v 1 d c > 1 > > files a & b are both sorted lexicographically (according to 'sort', anyway). > The problem is that the join lexicographic '<' operator disagrees with sort's. > > Sorry if this bug has been found like a thousand times before, couldn't find > it via 30s of googling.
Newer versions of join are more helpful. $ join b a join: file 2 is not in sorted order $ join b <(sort -k 1b,1 a) 1 B cheers, Pádraig
