perl -pi -e 's/\r\n/\n/g' filename, from DOS to UNIX
perl -pi -e 's/\n/\r\n/g' filename, from UNIX to DOS
perl -pi -e 's/\r/\n/g' filename, from MAC to UNIX
peri -pi -e 's/\n/\r/g' filename, from UNIX TO MAX

--- "AITHA, BHEEMSEN (SBCSI)" <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I had copied some files from c:\ drive on to Unix
> machine. At the end of
> each line, I see the end of line character(^M). To
> get rid of all these ^M
> characters, I had opened a file in vi and performed
> the following command.
> 
> :s/^M//g
> 
> But vi says that pattern does not exist. Is there
> any other hidden character
> associated here ? Can any one tell me how to get rid
> of them. I have lots of
> files. A small perl script would be a lot  of help
> to me.
> 
> Thanx..
> -Bheem
> 
> _______________________________________________
> Perl-Unix-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe:
http://listserv.ActiveState.com/mailman/mysubs


=====




__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to