If you are going from DOS to Unix you could use the following perl script:

#!/usr/bin/perl -w

use strict;

my $pcfile = shift || "/tmp/dosfile.txt" ;
my $outfile = shift || "/tmp/unixconverted.txt";

die "Cannot read $pcfile..." unless -r $pcfile;

open(IN, "$pcfile") or die "Cannot open $pcfile: $!";
open(OUT, ">$outfile") or die "Cannot open $outfile: $!";

$/ = "\r"; ## pc end of line, damn gates

while(<IN>) {
   chomp;
   print OUT "\n";
}

## should really check the close of these but...
close(IN);
close(OUT);

exit;


--------
Lee Carmichael          
Service Architect - WorkSpace

WAM!NET Inc.
655 Lone Oak Rd Building A
Eagan, MN 55121

ph# 651-256-5292 
email: [EMAIL PROTECTED]

On Tue, 3 Dec 2002, Thomas von Hassel wrote:

> 
> On Tuesday, December 3, 2002, at 10:11 PM, Jerry McAllister wrote:
> >
> >
> > If you are moving th efiles, use ftp in ASCII mode.  It will then
> > do the conversion for you.  After you make the ftp connection and
> > before GETting or PUTting the file, type ASCII to select ASCII mode.
> 
> that doesnt work, tried diferent ftp clients both getting and putting 
> the files ...
> 
> /thomas
> 
> 
> --
> Thomas von Hassel
> DarX @ irc
> darxmac @ AIM/iChat
> Powered by inkwell...!
> 
> 
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message
> 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to