I was cleaning up some source code yesterday and wanted to print it all out, however the Mac line endings (we use Mac's and Ubuntu mostly) were messing up the printout on my Ubuntu machine.
A quick google later and I found the solution, a program called 'tr', posting here for next time:
tr "\r" "\n" < filewithmaclineendings.txt > filewithunixlineendings.txt
Obviously you could convert from Unix to Mac by reversing it.
tr "\n" "\r" < filewithunixlineendings.txt > filewithmaclineendings.txt
Cheers, Mark
0 Comments