perl -i.bak -npe 's/\r\n/\n/g' <file>

where <file> is the filename you want to clean.
A backup copy of your original file will be created in the same directory
with a ".bak" extension.

____________________
Chris Spurgeon
Senior Design Technologist
[EMAIL PROTECTED]

ELECTRONIC INK
One South Broad Street
19th Floor
Philadelphia, PA 19107
www.electronicink.com

t 215.922.3800 x(233)
f 215.922.3880


-----Original Message-----
From: Booher Timothy B 1stLt AFRL/MNAC
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 5:32 PM
To: [EMAIL PROTECTED]
Subject: perl script to remove control M's



I have what seems to be a persistent problem with all files that I import
from dos into emacs. I have those control M's all over the place.

Does anyone know of a perl script to 'clean' these files?

Thanks so much,

tim
____________________________________________________
Timothy B Booher, Lt USAF, AFRL/MNAC
101 West Eglin Blvd, Suite 339 
Eglin AFB FL 32542-6810 
Phone: 850-882-8302 Ext. 3360 (DSN 872-)
FAX: 850-882-2201

This e-mail is intended solely for the above-mentioned recipient and it may
contain confidential or privileged information.  If you have received it in
error, please notify us immediately and delete the e-mail.  You must not
copy, distribute, disclose or take any action in reliance on it.  In
addition, the contents of an attachment to this e-mail may contain software
viruses which could damage your own computer system.  While Electronic Ink,
Inc. has taken every reasonable precaution to minimize this risk, we cannot
accept liability for any damage which you sustain as a result of software
viruses.  You should perform your own virus checks before opening the
attachment.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to