adding Windows carriage returns

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Victor Odhner
Date:  
Subject: adding Windows carriage returns
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to for more info.

------_=_NextPart_001_01BFAA17.505AA230
Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1
Content-ID: <>

On Wed, 19 Apr 2000, 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.


First, check that your system doesn't have a utod (Unix to DOS)
command. That would just be a pipe command. utod < foo > foo.dos

Otherwise, here's a little Perl program:

while (<>)
{
s/$/\r/;
print;
}

Type this into a file (call it utod.pl) and then do this:

perl utod.pl < foo > foo1

and foo1 will be a carriage-returned copy of foo.

Good luck,

Vic

------_=_NextPart_001_01BFAA17.505AA230--