in reply to can't see ^M to process.

A shorter version of ikegami's code:

perl -pi -e 's/\015//g' Filename

They say that time changes things, but you actually have to change them yourself.

—Andy Warhol

Replies are listed 'Best First'.
Re^2: can't see ^M to process.
by xorl (Deacon) on Jul 19, 2005 at 17:56 UTC
    Even shorter
    perl -e 's/\r//g' Filename
      that won't work. I guess you mean:
      perl -pi -e 's/\r//g' Filename
      but, most of the time, only the cr on the end is to be removed:
      perl -pi -e 's/\r$//' Filename

      Paul