translate

Converting Mac text files into UNIX text files (tr)

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' < in_file > out_file