tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dg B" <>
Subject Re: ^M characters
Date Fri, 01 Sep 2000 17:00:28 GMT

>I downloaded the Tomcat & tried to install it on a Unix computer.  I
>uncompressed and untarred the file, jakarta-tomcat.tar.gz.  When I opened
>any conf files or Java source files with vi editor, I saw the ^M characters
>on every line.  I am wondering whether I downloaded the wrong file.  How 
>I get a 'clean' version without any '^M's for my Unix environment?
>Thanks for any help.

Hi Phil,

  You could write a Perl script to clean it up:


$filename = shift;   //get from input param
$foo = "/tmp/foo";

open(F,<$filename) or die "ouch";
open(F2,>$foo) or die "ouch2";

while(<F>) {
   $_ =~ s/'^M'//g;   //or maybe this... $_ =~ s/'^M'/'\n'/g;

I hope this helps...
Get Your Private, Free E-mail from MSN Hotmail at

Share information about yourself, create your own public profile at

View raw message