Converting file end characters in DOS, UNIX, and MAC format

Forum topic
Forums: 

The various different file conversions to fix the end characters from different file system types.

DOS to UNIX

To convert a DOS file called file.tex to UNIX format do

dos2unix file.tex

UNIX to DOS

To convert it back do

unix2dos file.tex

MAC to UNIX

To convert a MAC file called in_file to UNIX format do

tr '\015' '\012' < in_file > out_file