adding Windows carriage returns

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: MikeCantrellyomahz@devnull.org
Date:  
Subject: adding Windows carriage returns
try this:

perl -p -i -e 's/\n/\r\n/' filename

Patrick Rhodes wrote:

>
>
> I have text file in Linux that I need converted to Windows. From what
> I understand, I need to add an extra carriage return or line feed at
> the end of each line to read it properly in Windows. I can't figure
> out how to do this and I've been looking at the 'sed' at 'tr'
> commands. I'm sure the answer is in there, but I'm unable to figure
> it out as of yet. Can anybody help me with this? Any and all
> information is appreciated. Thanks!
>
> Patrick