[Cialug] Windows End-Of-Line?

Morris Dovey mrdovey at iedu.com
Wed May 5 08:24:44 CDT 2010


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


More information about the Cialug mailing list