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

Sean Edwards cybersean3000 at yahoo.com
Thu Dec 11 15:46:32 UTC 2003


I believe there to be a perl script called "dos2unix"
which does this.

This vi command strips the last character from the end
of each line:

:%s/.$//g

-=Sean Edwards=-
cybersean3000 at yahoo.com


--- Adam Lassek <hayai2 at cox.net> wrote:
> The ^M's are put there when you save a text file in
> Windows; Windows
> uses an extra character to signify a newline.
> 
> Search for a script called the demoronizer.
> 
> On Thu, 2003-12-11 at 09:34, 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?
> > 
> > anyone know that?
> > 
> > ~shaughn
> > http://emosai.net
> > _______________________________________________
> > OLUG mailing list
> > OLUG at olug.org
> > http://lists.olug.org/mailman/listinfo/olug
> 
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/


More information about the OLUG mailing list