[Cialug] Windows End-Of-Line?
Josh More
MoreJ at alliancetechnologies.net
Wed May 5 08:27:56 CDT 2010
unix2dos (on some systems)
linux2dos (on other systems)
flip -u (on most modern systems)
in vim, it's :s/$/^V^M/g (control-v control-m)
You can do it with sed too, but I always use vim, 'cause I'm just wacky that way.
-Josh More, CISSP, GIAC-GSLC, GIAC-GCIH, RHCE, NCLP
morej at alliancetechnologies.net
515-245-7701
________________________________________
From: cialug-bounces at cialug.org [cialug-bounces at cialug.org] on behalf of Morris Dovey [mrdovey at iedu.com]
Sent: Wednesday, May 05, 2010 08:24
To: Central Iowa Linux Users Group
Subject: Re: [Cialug] Windows End-Of-Line?
On 5/5/2010 8:09 AM, Todd Walton wrote:
> When I write a bunch of text to a file and then open that file with
> Windows's Notepad program, it runs it all together in one line with
> boxes where the end-of-lines should be. Is there a sed line I could
> run the text through to make it Windows-friendly?
Perhaps (I don't know/use sed).
Windows expects the newline character to be preceeded by a carriage
return, so what you want to do is a global replacement
\n -> \r\n
HTH
_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug
More information about the Cialug
mailing list