adding Windows carriage returns
Victor Odhner
vodhner@primenet.com
Wed, 19 Apr 2000 10:36:34 -0700 (MST)
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 mime@docserver.cac.washington.edu for more info.
------_=_NextPart_001_01BFAA17.505AA230
Content-Type: TEXT/PLAIN; CHARSET=iso-8859-1
Content-ID: <Pine.BSI.3.96.1000419102839.26233E@usr09.primenet.com>
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--