0

Suppose there are file1:

1
2
3
5

And file2:

2
3
4

When comparing them with comm file1 file2 on FreeBSD or Linux, I got the following result:

1
                2
                3
        4
5

But when I tried the same command on Mac OSX 10.9, the result surprised me:

1
        2
        3
    4

Is the comm command broken on Mac? Or am I missing something?

Domon
  • 6,753
  • 1
  • 25
  • 29

1 Answers1

0

Works correctly on my Mavericks based iMac:

iMac:~/tmp: cat file1
1
2
3
5
iMac:~/tmp: cat file2
2
3
4
iMac:~/tmp: comm file[12]
1
    2
    3
    4
5
Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • Thanks. It seems that I forgot to save `file1` so it did not contain `5`. Sorry for asking the dumb question. – Domon Nov 19 '13 at 12:48