Re: perl script to convert dos newlines to unix newlines...

2002-12-14 Thread John W. Krahn
Ramprasad A Padmanabhan wrote: > > I had written a small script for my own use which gets rid of \r and > also all weird chars inserted by dos ( or windoze ) in plain text files > Do not use it on files which are not plain text > > #!/usr/bin/perl > # > # This file is used to clean the special ch

Re: [mail_lists] Re: perl script to convert dos newlines to unix newlines...

2002-12-14 Thread Gary Stainburn
On Saturday 14 Dec 2002 8:51 am, christopher j bottaro wrote: > yes...thank you. i was going to post exactly that, but didn't know how to > phrase it. i'm very capable of producing a script/program in whatever > language that reads a line from input, edits the line, then writes the > edited line

Re: [mail_lists] perl script to convert dos newlines to unix newlines...

2002-12-14 Thread Paul Johnson
On Sat, Dec 14, 2002 at 03:56:04AM -0500, Jim wrote: > perl -p -i -e 's/\r\n/\n/g' file_to_remove_those_pesky_^Ms_from > > Perl one-liners rule. :) This will do it without making the second file. That depends on what you mean by "without making the second file". If the goal is to never have th

Re: [mail_lists] Re: perl script to convert dos newlines to unix newlines...

2002-12-14 Thread christopher j bottaro
yes...thank you. i was going to post exactly that, but didn't know how to phrase it. i'm very capable of producing a script/program in whatever language that reads a line from input, edits the line, then writes the edited line to a new file (or stdout or whatever). but like Jim said, the ques

Re: [mail_lists] Re: perl script to convert dos newlines to unix newlines...

2002-12-14 Thread Jim
On Friday 13 December 2002 12:18, Gary Stainburn wrote: This still doesn't answer his question. He doesn't want to take up 20 Mb's of hdd space trying to do the edit. :) btw, in a regex \r\n works fine. :) - Jim | On Friday 13 Dec 2002 10:42 am, christopher j bottaro wrote: | > hey, | > i wan

Re: [mail_lists] perl script to convert dos newlines to unix newlines...

2002-12-14 Thread Jim
On Friday 13 December 2002 05:42, you wrote: on the command line do this: perl -p -i -e 's/\r\n/\n/g' file_to_remove_those_pesky_^Ms_from Perl one-liners rule. :) This will do it without making the second file. - Jim | hey, | i wanna make a perl script that will convert those stupid "\r\n" d

Re: perl script to convert dos newlines to unix newlines...

2002-12-13 Thread Ramprasad A Padmanabhan
Christopher J Bottaro wrote: hey, i wanna make a perl script that will convert those stupid "\r\n" dos newlines to good unix "\n" newlines...=) the problem isn't really a perl problem, but a general programming problem that i've always kinda wondered about. so i guess what i'm gunna do is op

Re: perl script to convert dos newlines to unix newlines...

2002-12-13 Thread Charles Galpin
On Fri, 13 Dec 2002, christopher j bottaro wrote: > hey, > i wanna make a perl script that will convert those stupid "\r\n" dos newlines > to good unix "\n" newlines...=) the problem isn't really a perl problem, but > a general programming problem that i've always kinda wondered about. > > so

Re: perl script to convert dos newlines to unix newlines...

2002-12-13 Thread Gary Stainburn
On Friday 13 Dec 2002 10:42 am, christopher j bottaro wrote: > hey, > i wanna make a perl script that will convert those stupid "\r\n" dos > newlines to good unix "\n" newlines...=) the problem isn't really a perl > problem, but a general programming problem that i've always kinda wondered > about

Re: perl script to convert dos newlines to unix newlines...

2002-12-13 Thread Mystik Gotan
: [EMAIL PROTECTED] From: christopher j bottaro <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: perl script to convert dos newlines to unix newlines... Date: Fri, 13 Dec 2002 04:42:59 -0600 hey, i wanna make a perl script that will convert th

perl script to convert dos newlines to unix newlines...

2002-12-13 Thread christopher j bottaro
hey, i wanna make a perl script that will convert those stupid "\r\n" dos newlines to good unix "\n" newlines...=) the problem isn't really a perl problem, but a general programming problem that i've always kinda wondered about. so i guess what i'm gunna do is open the file, read in a line, sea