Hi Tanton

Thanks for the reply. I tried what you suggested, but i get no luck. So far 
i'm about 1/4 of the way through the file just doing it manually. Do you 
ahve any other suggestion?

A sample from the file looks like this:

   while ( $row = $db->sql_fetchrow($result) );^M          
$db->sql_freeresult($result);^M^M               $total_threads = 
count($threadrow);^M   }^M     else^M  {^M             
message_die(GENERAL_MESSAGE, $lang['No_posts_topic']);^M        }^M}^M// END 
THREADED MOD CODE^M^M^M# ^M#-


Thanks

Desmond




>From: "Tanton Gibbs" <[EMAIL PROTECTED]>
>To: "Desmond Lee" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
>Subject: Re: question about replacing ^M
>Date: Mon, 22 Jul 2002 17:46:05 -0400
>
>That ^M is the \r that is used by DOS based systems for EOL.  Basically, 
>DOS
>uses \r\n for EOL and Unix only uses \n.  So, you have to eliminate all of
>the \r.
>
>If you have dos2unix on your system you can use that program otherwise do:
>
>perl -pi.bak -e 's/\r\n/\n/g' moby_threads_install.txt
>
>----- Original Message -----
>From: "Desmond Lee" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Monday, July 22, 2002 5:41 PM
>Subject: question about replacing ^M
>
>
> > Hi guys
> >
> > I'm trying to read a file, but it's just one massive line. I think that
>the
> > ^M  is suppose to be an indication that that's wehre teh newline is
>suppose
> > to be. I've tried to replace ^M with a newline by executing something 
>that
>i
> > found on the web:
> >
> > perl -pi.bak -e 's/\^M/\n/g' moby_threads_install.txt
> >
> >
> > This didn't work. Even in vi when i do a search for ^M by doing '/^M' it
> > says that no matches were found. The ^M is not two characters but one. 
>Can
> > anyone out there please help me?
> >
> > Thanks
> >
> > Desmond
> >
> >
> >
> > _________________________________________________________________
> > Join the world's largest e-mail service with MSN Hotmail.
> > http://www.hotmail.com
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to