[olug] How to remove ^M's from files?

Jay Hannah jay at jays.net
Tue Dec 16 04:15:14 UTC 2003


On Thursday, December 11, 2003, at 09:34 AM, Shaughn wrote:
> i have a bunch of web pages that have ^M's as the end because they 
> weren't saved correctly.
>
> I vaguely remember a command line trick to get rid of these?

perl -pi -e 's/\r\n$/\n/' *.html

Cheers,

j
Omaha Perl Mongers: http://omaha.pm.org





More information about the OLUG mailing list