Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-04 Thread Warren Block
On Tue, 3 Dec 2002, D J Hawkey Jr wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] writes: It's a bit easier if you let Perl do the heavy lifting: perl -pi -e 's/\r//g' file-to-convert Even easier (and lighter) if you ditch the perl: sed -e 's/\r//g' input output

Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-04 Thread Jerry McAllister
... Much deleted ... Ack. Looks like you're right, and I agree with you. If [2addr]l can output '\r', [2addr]s/regex/repl/flags ought to understand \r. I have to wonder how many times I may have been bitten by this mis-feature. ;-, This'll work though: sed -e 's/[[:cntrl:]]$//g'

Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-04 Thread D J Hawkey Jr
On Dec 04, at 10:20 AM, Jerry McAllister wrote: This'll work though: sed -e 's/[[:cntrl:]]$//g' I like the tr(1) conversion too, but I always seem to think in terms of sed(1) and awk(1). And if that sed(1) solution is still too loose, the tr(1) solution reduces

tool/method to convert DOS line endings to UNIX line endings

2002-12-03 Thread Thomas von Hassel
Any ideas in re to subject ? /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

Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-03 Thread Jerry McAllister
S)ubject: Re: tool/method to convert DOS line endings to UNIX line endings Any ideas in re to subject ? First of all, please put all relevant information in the body of your message. It makes it very difficult to read and impossible to quote things that are only mentioned in the subject line

Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-03 Thread Thomas von Hassel
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

RE: tool/method to convert DOS line endings to UNIX line endings

2002-12-03 Thread Jeff MacDonald
PROTECTED] Subject: Re: tool/method to convert DOS line endings to UNIX line endings 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

Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-03 Thread Lee J Carmichael
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: $!;

Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-03 Thread Warren Block
On Tue, 3 Dec 2002, Lee J Carmichael wrote: If you are going from DOS to Unix you could use the following perl script: [script snipped] It's a bit easier if you let Perl do the heavy lifting: perl -pi -e 's/\r//g' file-to-convert -Warren Block * Rapid City, South Dakota USA To

Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-03 Thread Lee J Carmichael
Good point, I pulled it from a script that was doing some additional magic. Lee On Tue, 3 Dec 2002, Warren Block wrote: On Tue, 3 Dec 2002, Lee J Carmichael wrote: If you are going from DOS to Unix you could use the following perl script: [script snipped] It's a bit easier if you

Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-03 Thread Larry Rosenman
tr(1), ports/converters/dosunix,ports/converters/unix2dos LER --On Tuesday, December 03, 2002 21:59:03 +0100 Thomas von Hassel [EMAIL PROTECTED] wrote: Any ideas in re to subject ? /thomas -- Thomas von Hassel DarX @ irc darxmac @ AIM/iChat Powered by inkwell...! To Unsubscribe: send

Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-03 Thread Jerry McAllister
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

Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-03 Thread Thomas von Hassel
On Wednesday, December 4, 2002, at 12:09 AM, Jerry McAllister 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

Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-03 Thread Kirk Strauser
At 2002-12-03T21:53:29Z, Lee J Carmichael [EMAIL PROTECTED] writes: while(IN) { chomp; print OUT \n; } Wouldn't that print only an EOL? Shouldn't that be: print OUT $_\n; or similar? -- Kirk Strauser In Googlis non est, ergo non est. To Unsubscribe: send mail to [EMAIL

Re: tool/method to convert DOS line endings to UNIX line endings

2002-12-03 Thread D J Hawkey Jr
[Posted and mailed] In article [EMAIL PROTECTED], [EMAIL PROTECTED] writes: On Tue, 3 Dec 2002, Lee J Carmichael wrote: If you are going from DOS to Unix you could use the following perl script: [script snipped] It's a bit easier if you let Perl do the heavy lifting: perl