Mac : How to convert Windows text file to unix

By | October 22, 2011

Windows text editors add a tailing character ( ^M ) for line break. To get a real Unix flat file without theses characters, simply run the following command in terminal :

tr '\r' '\n' < Windows_Text_File.txt > Unix_Text_File.txt