If you routinely move text files among Windows, Macs, and *nix machines, you may want to convert from one style of line endings to another. The flip program is very handy. Here’s the scoop:

Usage: flip [-t|-u|-d|-m] filename[s]
   Converts ASCII files between Unix, MS-DOS/Windows, or Macintosh newline formats
   Options:
      -u  =  convert file(s) to Unix newline format (newline)
      -d  =  convert file(s) to MS-DOS/Windows newline format (linefeed + newline)
      -m  =  convert file(s) to Macintosh newline format (linefeed)
      -t  =  display current file type, no file modifications

Flip is available on Macports and in fine apt repositories everywhere.