Problems in "comm"

With respect to my other query I was trying to compare the data in files with "comm" command.

File -1: (InCU_notDB)
EP120307602281841
EP120607602631482
EP120607602631483
EP120607602631484
EP120607602631485
EP120607602631486
EP120607602631487
EP092905800544601
EP071708601490636
EP071708601490637
EI090409400150849
123456


File -2: (InCU_notDB1)
EP120307602281841
EP120607602631482
EP120607602631483
EP120607602631484
EP120607602631485
EP120607602631486
EP120607602631487
EP092905800544601
EP071708601490636
EP071708601490637
123456

Command used:
comm -12 InCU_notDB InCU_notDB1>c
more c

Output:
EP120307602281841
EP120607602631482
EP120607602631483
EP120607602631484
EP120607602631485
EP120607602631486
EP120607602631487
EP092905800544601
EP071708601490636
EP071708601490637

Question:
Why isnt the value "123456" not included in the output file c?

BTW, I manually added "123456" by using the vi editor. Rest of the values were created by some other code. Just for learning I modified the values to check how it works.

Thanks in advance,

Regards,

comm assumes the files are sorted.

Oh is it... thanks then.... it wont fit my bill.... :frowning:

If you don't mind the alphabetically ordered output:

comm -12 <(sort -u InCU_notDB) <(sort -u InCU_notDB1)

this also work i guess..

awk 'FNR==NR{f1[$0];next}$0 in f1' InCU_notDB InCU_notDB1