Converting Mac text files into UNIX text files (tr)

First published April 4, 2007 • Last modified on July 18, 2026 • 1 min read • 66 words
If you though text files are all the same, you are wrong.
If you though text files are all the same, you are wrong. Mac text file lines end with a carriage return (CR, ASCII 13), UNIX text file lines with a line feed (LF, ACII 10) and Microsoft Windows text file lines end with a combination of 2 characters: CR followed by LF. From Mac to Unix you convert with this command line: tr '\015' '\012' out_file