I go back and forth between Darwin (and Linux at my workplace) and OS X all the time. The problem is that the convention for linefeeds is different between Unix and Mac. I know new version of MacArmyKnife can fix it, but here is the free solution.
Open the file with xemacs. As the bundled emacs does not work for this purpose, I've installed a copy through fink.
Now type:
Meta-x replace-stringThis changes ^M (Mac linefeeds) to ^J (Unix linefeeds) for the entire buffer.
^Q^M
^Q^J
^X^Sand you're done.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20020306212503540