From owner-freebsd-questions@FreeBSD.ORG Sun May 8 19:53:07 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 386B116A4E6 for ; Sun, 8 May 2005 19:53:07 +0000 (GMT) Received: from fed1rmmtao10.cox.net (fed1rmmtao10.cox.net [68.230.241.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1CD743D77 for ; Sun, 8 May 2005 19:53:06 +0000 (GMT) (envelope-from mnavarre@cox.net) Received: from [192.168.1.13] (really [68.6.195.68]) by fed1rmmtao10.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050508195307.DUVU20235.fed1rmmtao10.cox.net@[192.168.1.13]> for ; Sun, 8 May 2005 15:53:07 -0400 Message-ID: <427E6E22.3030400@cox.net> Date: Sun, 08 May 2005 12:53:06 -0700 From: Matt Navarre User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: questions@freebsd.org References: <20050508192019.127ED1CE303@ws1-6.us4.outblaze.com> <20050508214047.109a3584.regisr@pobox.com> In-Reply-To: <20050508214047.109a3584.regisr@pobox.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [freebsd] On removing ^M X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2005 19:53:07 -0000 regisr wrote: > On Sun, 08 May 2005 14:20:19 -0500 > "Fafa Hafiz Krantz" wrote: > > >>I am wondering what is needed (what tool or what code) to >>do a mass (recursive) removal of ^Ms? > > > try: > tr -d "\r" < input-file > output-file > > Or: perl -pi -e 's/\015//' *.c which will edit all .c files in place, or: perl -pi.bak -e's/\015//' *.c Which will also edit the files in place but leave the originial files with a .bak extension. Just a little easier to do on a whole directory of files than using tr. OK, Matt