Using tr to emulate dos2unix

As pointed out in many postings and sites, one can use tr to remove octal 015 (^M or CR)

tr -d '\015' < oldfile > newfile