Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I used comm to compare two sorted files. Each line in these files are positive integer numbers. But the results show

comm: file 1 is not in sorted order
comm: file 2 is not in sorted order

How come the error even if these two files are sorted?

share|improve this question

1 Answer 1

comm wants literal sort, not numeric sort. Correct this and the problem should go away.

share|improve this answer
    
how to make it do numeric sort? –  wenzi Nov 16 '12 at 11:32
1  
@wenzi sort -n –  Gilles Nov 16 '12 at 22:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.