Converting Mac linefeeds to Unix linfeeds
Mar 06, '02 09:25:03PM • Contributed by: neutrino
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-string
^Q^M
^Q^J
This changes ^M (Mac linefeeds) to ^J (Unix linefeeds) for the entire buffer.
Save it:
^X^S
and you're done.