in reply to Re: Removing Carriage returns from text files
in thread Removing Carriage returns from text files

Since none of the replies you have received so far actually solves the problem except under certain restricted circumstances, here is a little utility, macorpc2unix that we use here about a million times a day:
#!/usr/bin/perl -w -i while (<>) {s/\r\n*/\n/g; print;}
It will convert PC or Mac text files to Unix format. I see that you could rewrite it with a -p swithc and dispense with the while but I will leave that as an exercise.

Regards,
Helgi Briem

Replies are listed 'Best First'.
Re: Re: Re: Removing Carriage returns from text files
by demerphq (Chancellor) on Oct 18, 2001 at 21:47 UTC
    we use here about a million times a day:

    But I bet only on *nix boxes, cause it wont work under win32.

    :-)

    Yves
    --
    You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)