From owner-freebsd-questions Tue Feb 25 18:31:28 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id SAA06457 for questions-outgoing; Tue, 25 Feb 1997 18:31:28 -0800 (PST) Received: from narcissus.ml.org (root@brosenga.Pitzer.edu [134.173.120.201]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA06452 for ; Tue, 25 Feb 1997 18:31:26 -0800 (PST) Received: from localhost (ben@localhost) by narcissus.ml.org (8.7.5/8.7.3) with SMTP id SAA03316; Tue, 25 Feb 1997 18:31:06 -0800 (PST) Date: Tue, 25 Feb 1997 18:31:06 -0800 (PST) From: Snob Art Genre 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: > Greetings, > > 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... > > tr -d '\015' < filename > filename.new ; mv filename.new filename > > ... but there must be a simple way to automate this process and avoid > having to type this over and over again. I'm wondering if there are any > clever shell programmers out there that can help me with a script to > walk a directory tree and process these files. Why don't you ftp the files to yourself in ascii mode? Alternately, see the unix FAQ, which covers just this sort of thing, and man xargs. > Thanks > Randy > Ben "You have your mind on computers, it seems."