From owner-freebsd-questions Wed Dec 4 7:20:59 2002 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 600DB37B404 for ; Wed, 4 Dec 2002 07:20:58 -0800 (PST) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4493543EB2 for ; Wed, 4 Dec 2002 07:20:57 -0800 (PST) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.6+Sun/8.11.6) id gB4FKgD20705; Wed, 4 Dec 2002 10:20:42 -0500 (EST) From: Jerry McAllister Message-Id: <200212041520.gB4FKgD20705@clunix.cl.msu.edu> Subject: Re: tool/method to convert DOS line endings to UNIX line endings To: hawkeyd@visi.com Date: Wed, 4 Dec 2002 10:20:41 -0500 (EST) Cc: wblock@wonkity.com (Warren Block), freebsd-questions@FreeBSD.ORG In-Reply-To: <20021204080104.A56240@sheol.localdomain> from "D J Hawkey Jr" at Dec 04, 2002 08:01:04 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 > > ... Much deleted ... > > Ack. Looks like you're right, and I agree with you. If "[2addr]l" can output > '\r', "[2addr]s/regex/repl/flags" ought to understand "\r". I have to wonder > how many times I may have been bitten by this mis-feature. ;-, > > This'll work though: > sed -e 's/[[:cntrl:]]$//g' > > > > I like the tr(1) conversion too, but I always seem to think in terms of > > > sed(1) and awk(1). > > And if that sed(1) solution is still "too loose", the tr(1) solution reduces > "[[:cntrl:]]" to just the CR character. > Just to be clear on this issue; you want to be left with the LF characters and get rid of the CR characters not the other way around. I am not a sed person, but your statement is backwards even if your sed works. ////jerry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message