Line Terminations
Date : April 13, 2006
Line terminations for different operating systems:
unix | 0x0a | LF |
Classic Mac | 0x0d | CR |
Windows | 0x0d 0x0a | CR LF |
To convert a text file with DOS line termination to UNIX line termination:
tr -d '15' unixfile.txt
or
sed s/.$// winfile.txt > unixfile.txt
To convert a unix file to a DOS file:
sed s/$/x0d/ unixfile.txt > winfile.txt