Comparing two files (comm or awk) - help - very urgent pls

I an unix newbie and am confused about the working of "comm".

I have two files to be compared and the three columns of output after comparison should be stored a three separate files.

File abc
--------
pink
orange
green
blue
black
maroon

File xyz
---------
pink
yellow
grey
black
blue
maroon

I use :1) comm -23 abc xyz (to get lines unique to abc)
2) comm -13 abc xyz (to get lines unique to xyz)
3) comm -12 abc xyz (to get lines common to both abc and xyz files)

output of 1) is :
--------------
orange
green
blue
black
maroon

output of 2) is:
---------------
yellow
grey
black
blue
maroon

output of 3) is :
---------------
pink (?!?!?)

this is strange to me as i find the lines containing "maroon" is common to both files.. still not pulled out by (3).

Can somebody explain where I missed?

It would be great if help is given on usage of "awk" to do something similar. (In fact, the files I've to compare are much larger than I explained my problem with).

Thanks in advance
Sirisha

The man says ' comm - select or reject lines common to two sorted files'. your fileks are not sorted. Try executing after sorting them.

Did you not find the results of 1 and 2 strange? Yet you only noticed the results of 3 to be very different. 1 and 2 also are not showing up the proper results. You need to sort the input files.

The POSIX specification has this to say

If the lines in both files are not ordered according to the collating sequence of the current locale, 
the results are unspecified.

Vino

Thanks a lot ranj@chn and vino!

That was a silly overlooking mistake, but now i got it.

In fact these are my actual input files.

seqfile
------
ORDERNO ORDERDATE ORDERDESC STREET CITY

1
2
3
4
5
6
7
8
9
10

target
------
ORDERNO ORDERDATE ORDERDESC STREET CITY
2
3
4
5

"target" is file generated from the "seqfile" by extracting a few rows (Content in all the fields in the target is same as that of seqfile.. no modifications). Now that seqfile and target are sorted, comparing these two to find out common lines (comm -12 seqfile target), gives me "null" (no output).

Correct me if I'm wrong in saying that I should get an output equivalent to the "target" file.
Also what is the correct output of "comm - 13 seqfile target" ? Is it ok if I get the target file as the output of this statement?

Many thanks,
Sirisha