Subject: Re: [plug] utility for getting rid of pesky DOS carriage returns
From: Sherwin Daganato [mailto:[email-masked]]
To: Philippine Linux Users Group Mailing List

On Wed, Jul 30, 2003 at 06:16:18PM +0800, Joel Realubit wrote:
> hi everyone:
> 
> is there a command-line utility that can get rid of ^M characters from 
> text files written under Windows/DOS? i'm editing code in vi and those 
> ^M's are a bit annoying.

In your vi session, execute

:set fileformat=unix

If you want to this in the command-line, see following links:

http://marc.free.net.ph:80/message/20020704.102417.4e0ffadf.html
http://marc.free.net.ph:80/message/20020704.103008.9b104004.html
From: "Holgado, Pedro" <[email-masked]>
To: 'Philippine Linux Users Group Mailing List' <[email-masked]>
Subject: RE: [plug] utility for getting rid of pesky DOS carriage returns
Date: Wed, 30 Jul 2003 03:30:30 -0700

do search and replace in vi.

:%s/{CNTRL-V}{CNTRL-M}//

Date: Wed, 30 Jul 2003 22:12:12 +0800 (PHT)
Subject: Re: [plug] utility for getting rid of pesky DOS carriage returns
From: "Jimmy Lim" <[email-masked]>
To: "Philippine Linux Users Group Mailing List" <[email-masked]>

Hi Joel,

Try using the col(1) command
   $ col -bx < dos.file > unix.file

Date: Wed, 30 Jul 2003 18:21:28 +0800
From: Ariz Jacinto <[email-masked]>
To: Philippine Linux Users Group Mailing List <[email-masked]>
Subject: Re: [plug] utility for getting rid of pesky DOS carriage returns

dos2unix
   
    http://www.megaloman.com/~hany/software/hd2u/