join command issue,thanks!!!

Hi,

This is the second time for me to ask question about join command, i really feel sorry and shame. But it is very difficult to me.

Please kindly help on how to get my desired result(i give it below), in additon to tell me how, please also kindly tell me why.

Thanks in advanced.

input:

file1:
47|1
48|1
216|1
219|1
483|1
484|1

file2:
47|Oct|3ZL1998
48|Dec|3BC1977
216|sept|3ZL1998
219|dec|2CC1999
483|may|5PA1998
484|nov|7PL1996

code:

join -t"|" -j1 1 -j2 1 file1 file2

output:

47|1|Oct|3ZL1998
48|1|Dec|3BC1977
483|1|may|5PA1998
484|1|nov|7PL1996

What i expected is:

47|1|Oct|3ZL1998
48|1|Dec|3BC1977
216|1|sept|3ZL1998
219|1|dec|2CC1999
483|1|may|5PA1998
484|1|nov|7PL1996

From join manpage:

Sort it and it works:

$ cat f1
47|1
48|1
216|1
219|1
483|1
484|1
$ cat f2
47|Oct|3ZL1998
48|Dec|3BC1977
216|sept|3ZL1998
219|dec|2CC1999
483|may|5PA1998
484|nov|7PL1996

$ sort -t"|" -k1,1 f1 > f1.sort
$ sort -t"|" -k1,1 f2 > f2.sort

$ cat f1.sort
216|1
219|1
47|1
48|1
483|1
484|1
$ cat f2.sort
216|sept|3ZL1998
219|dec|2CC1999
47|Oct|3ZL1998
48|Dec|3BC1977
483|may|5PA1998
484|nov|7PL1996

$ join -t"|" -j 1 f1.sort f2.sort
216|1|sept|3ZL1998
219|1|dec|2CC1999
47|1|Oct|3ZL1998
48|1|Dec|3BC1977
483|1|may|5PA1998
484|1|nov|7PL1996

HTH