: Re: Unix to dos; dos to unix...
Hi There,
Just a small addition on the remarks :
I don't know if you realy want this to automate, but "vi" can do it as well.
Just type :
:1,$s/[Ctrl + v] [Ctrl + m]//g
The [Ctrl + v] makes you able to type in an escape character.
Most of al
Hi There,
Just a small addition on the remarks :
I don't know if you realy want this to automate, but "vi" can do it as well.
Just type :
:1,$s/[Ctrl + v] [Ctrl + m]//g
The [Ctrl + v] makes you able to type in an escape character.
Most of all the [Ctrl + m] (^M) is bothering you.
:) I know,
On Thursday 25 April 2002 3:08 pm, Ron Powell wrote:
> There is a utility out there that will convert unix-style end-of-lines (LF)
> to dos-style (CR/LF)...
>
> Just for giggles, I'm trying to write a perl script to do this...
>
> Here's what I've tried...
>
> while () {
> $line = $_;
>
on Thu, 25 Apr 2002 14:08:12 GMT, [EMAIL PROTECTED] (Ron Powell)
wrote:
> The same input file, when converted using the unix utility
> unix2dos, converts "properly." This leads me to believe that I'm
> missing something obvious here
You need 'binmode':
perldoc -f binmode
> I'm
Ron Powell wrote:
> There is a utility out there that will convert unix-style end-of-lines (LF)
> to dos-style (CR/LF)...
>
> Just for giggles, I'm trying to write a perl script to do this...
>
> Here's what I've tried...
>
> while () {
> $line = $_;
> $line=~tr/\012/\015\012/;
>
hi Ron,
another unix command is flip.
i've written a small perl script that converts a dos file to a unix
one.
as you can see, i've just substituted the \r\n with a \n. the reverse
can easily be done. this is a working example. it's not fast, but
workable. i'd welcome a
> -Original Message-
> From: Ron Powell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 25, 2002 10:08 AM
> To: '[EMAIL PROTECTED]'
> Subject: Unix to dos; dos to unix...
>
>
> There is a utility out there that will convert unix-style
> en
unix2dos and dos2unix is what you are looking for.
I tried with perl also and was unsucessful also for same reason.
> -Original Message-
> From: Ron Powell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 25, 2002 10:08 AM
> To: '[EMAIL PROTECTED]'
> Subject:
There is a utility out there that will convert unix-style end-of-lines (LF)
to dos-style (CR/LF)...
Just for giggles, I'm trying to write a perl script to do this...
Here's what I've tried...
while () {
$line = $_;
$line=~tr/\012/\015\012/;
print OUTFILE ("$line\n");