Dos2unix

dos2unix is a tool to convert text files from DOS line endings (carriage return + line feed) to Unix line endings (line feed). It is also capable of conversion between UTF-16 to UTF-8. Invoking the unix2dos command can be used to convert from Unix to DOS. This tool comes in handy when sharing files between Windows and Linux machines.

Usage
To convert a file that has DOS line endings to Unix format:

To convert a file that has Unix line endings to DOS format:

External resources

 * man dos2unix