As pointed out in many postings and sites, one can use tr to remove octal 015 (^M or CR)
tr -d '\015' < oldfile > newfile
© 2009 Allen Pomeroy. All Rights Reserved. This is the personal website of Allen Pomeroy. Opinions expressed are not necessarily those of my employer.