dos2unix on Mac

By Niklas Mähler

In Linux there’s a nice little tool called dos2unix that converts those nasty Windows line breaks into Unix line breaks. This is not available in OSX, but it is possible to do it with tr:

tr '\r' '\n' < file_to_convert.txt > output.txt

Nice and simple, and it seems to work just fine.

comments powered by Disqus