in reply to unwanted ^M during print in file

You may also wish to have a look at CRLF and Windows XP SP2.

(I use flip: Newline conversion between Unix, Macintosh and MS-DOS ASCII files a lot.)

HTH,

planetscape