in reply to Re: Removing Carriage returns from text files
in thread Removing Carriage returns from text files
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.#!/usr/bin/perl -w -i while (<>) {s/\r\n*/\n/g; print;}
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 |