From owner-freebsd-questions@FreeBSD.ORG Fri Aug 1 17:42:47 2003 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 21E4B37B404 for ; Fri, 1 Aug 2003 17:42:46 -0700 (PDT) Received: from harrier.mail.pas.earthlink.net (harrier.mail.pas.earthlink.net [207.217.120.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 350AE43FBD for ; Fri, 1 Aug 2003 17:42:46 -0700 (PDT) (envelope-from parv_fm@mailsent.net) Received: from sdn-ap-011dcwashp0328.dialsprint.net ([63.188.105.74] helo=moo.holy.cow) by harrier.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 19ikTt-0003Vs-00; Fri, 01 Aug 2003 17:42:45 -0700 Received: by moo.holy.cow (Postfix, from userid 1001) id E93E6C52A; Fri, 1 Aug 2003 20:45:43 -0400 (EDT) Date: Fri, 1 Aug 2003 20:45:43 -0400 From: parv To: Paul Beard Message-ID: <20030802004543.GB22483@moo.holy.cow> Mail-Followup-To: Paul Beard , Anil Garg , freebsd-questions@freebsd.org References: <8163366.1059777948620.JavaMail.paulbeard@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8163366.1059777948620.JavaMail.paulbeard@mac.com> cc: freebsd-questions@freebsd.org Subject: Re: How to remove ^M character 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: Sat, 02 Aug 2003 00:42:47 -0000 in message <8163366.1059777948620.JavaMail.paulbeard@mac.com>, wrote Paul Beard thusly... > > got room for one more? > > perl -pi -e s#\\r#\\n#g Doesn't work... file p p: ASCII text unixdos p q UnixDos 1.0.13 - SUMMARY: A total of 3 end of line characters were modified. file p q p: ASCII text q: ASCII text, with CRLF line terminators perl -pi -e 's#\\r#\\n#g' q # quotes are mine file p q p: ASCII text q: ASCII text, with CRLF line terminators This works... perl -pi -e 's/\r$//g' q file p q p: ASCII text q: ASCII text - Parv -- A programmer, budding Unix system administrator, and amateur photographer seeks employment: http://www103.pair.com/parv/work/