in reply to Removing carriage returns from source code

And if you are using the vi editor on *nix, you can do the following:
:%s/^M//g

To get the Control M character, press Control-V first, then Control-M.

TStanley

Originally posted as a Categorized Answer.