From owner-freebsd-questions Mon Apr 15 11:18:14 2002 Delivered-To: freebsd-questions@freebsd.org Received: from rambo.simx.org (rambo.simx.org [194.17.208.54]) by hub.freebsd.org (Postfix) with ESMTP id EE58937B416 for ; Mon, 15 Apr 2002 11:18:08 -0700 (PDT) Received: from rambo.simx.org (malin.twenty4help.se [195.67.108.195]) by rambo.simx.org (8.11.6/8.11.6) with ESMTP id g3FIHkD98201; Mon, 15 Apr 2002 20:17:54 +0200 (CEST) (envelope-from listsub@rambo.simx.org) Message-ID: <3CBB195D.1080208@rambo.simx.org> Date: Mon, 15 Apr 2002 20:18:05 +0200 From: "Roger 'Rocky' Vetterberg" User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us MIME-Version: 1.0 To: Ian Barnes Cc: freebsd-questions@FreeBSD.ORG Subject: Re: removing underscore M References: <001701c1e44e$3134a400$8400000a@comrite.co.za> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ian Barnes wrote: > Hi, > > I was wondering if there is a script that can remove that annoying M > (with underscore) from my files ? > > Thanx > > Ian > A quick and easy way is perl -i.bak -npe 's/\r\n/\n/g' Where is the name of the file poluted with those annoying ^M's. The original file will be saved as file.bak, just in case, allthough I have never had any problems and I frequently use this command. -- R To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message