Dos versus unix file formats
From Webpipe Wiki
Unix/Linux based systems use an end-of-line character that is typically represented with '\n' and is called a "newline" character. Windows/Dos systems, on the other hand use a "carriage-return" character represented by '\r' AND the Unix newline character '\n'
A Unix newline is this character: '\n'
A Windows newline is these characters '\r\n'
So, when you try to run a Dos/Windows formatted file on a Unix/Linux system, it sees an extra '\r' character before every newline.
Inversely, if you try to view a Unix/Linux formated file on a Dos/Windows system, it will be one big long continuous line.
Fortunately, many text editors recognize the different formats and display them appropriately. These editors usually have a "save as" option that allows you to specify which format to save it as. Some editors automatically detect the format and always save it back to that format, without providing an option for the format.
The following are a couple of Mac text editors that support saving to a Unix format
BBEdit Lite http://www.barebones.com/products/bblite/index.shtml
TextWrangler 2.0 http://www.barebones.com/products/textwrangler/index.shtml
You could also log into your shell account and run the "dos2unix" command to convert the file.



