Removing ^M

Tim Roberts timr at
Wed Jun 12 07:35:33 CEST 2002

so very tired <g0riaman at> wrote:

>Easiest way to do this is with sed.
>cat file.html | sed 's/^M//g' > newfile.html
>the trick is you have to enter ^M as the proper control character.
>You can do this at the command prompt by holding down CTRL+SHIFT and then
>hitting V and M in sequence.

Ctrl is always sufficient for this.  The Shift is merely decorative.
- Tim Roberts, timr at
  Providenza & Boekelheide, Inc.

More information about the Python-list mailing list