http://qs1969.pair.com?node_id=49827


in reply to Remove the ^M Character from a Document

Or... in solaris you can do:
dos2unix <filename> <newfilename>