From owner-freebsd-questions Tue Feb 25 19:29:00 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA10343 for questions-outgoing; Tue, 25 Feb 1997 19:29:00 -0800 (PST) Received: from cedb.dpcsys.com ([209.25.4.3]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA10338 for ; Tue, 25 Feb 1997 19:28:56 -0800 (PST) Received: from localhost (dan@localhost) by cedb.dpcsys.com (8.8.5/8.8.2) with SMTP id DAA17604; Wed, 26 Feb 1997 03:10:45 GMT Date: Tue, 25 Feb 1997 19:10:42 -0800 (PST) From: Dan Busarow To: Randy DuCharme cc: questions@freebsd.org Subject: Re: any sh or bash gurus out there? In-Reply-To: <3313999A.41C67EA6@nconnect.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 25 Feb 1997, Randy DuCharme wrote: > I'm stuck again. I have a couple hundred 'DOS' text files that I need > to make use of. I need to get rid of that annoying '^M' at the end > of each line. I can kill it like this... for filename in `find . -name "*.txt"` do tr -d '\015' < filename > filename.new ; mv filename.new filename done Plug in an appropriate expression for selecting the files and run from the root of the tree. Dan -- Dan Busarow 714 443 4172 DPC Systems / Beach.Net dan@dpcsys.com Dana Point, California 83 09 EF 59 E0 11 89 B4 8D 09 DB FD E1 DD 0C 82