Convert DOS and Windows line breaks to Unix line breaks

Posted October 18, 2003 by skreuzer in UNIX

These one liners will convert a file with DOS (or windows) line breaks to a file with Unix line breaks

DOS/Windows to Unix:

tr -d '\15\32' < dosfile.txt > unixfile.txt

Under Solaris this will work as well:

dos2unix dosfile.txt unixfile.txt

The Conversation

Follow the reactions below and share your own thoughts.