Following will convert text files between DOS, Mac, and Unix line ending styles:
$ recode /cl../cr <dos.txt >mac.txt $ recode /cr.. <mac.txt >unix.txt $ recode ../cl <unix.txt >dos.txt