From owner-freebsd-questions Fri Feb 28 11:09:49 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id LAA12029 for questions-outgoing; Fri, 28 Feb 1997 11:09:49 -0800 (PST) Received: from mpeks.tomsk.su (mpeks.tomsk.su [193.124.182.17]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id LAA12020 for ; Fri, 28 Feb 1997 11:09:40 -0800 (PST) Received: (from uucp@localhost) by mpeks.tomsk.su (8.6.11/8.6.9) with UUCP id CAA24364 for freebsd-questions@freebsd.org; Sat, 1 Mar 1997 02:07:35 +0700 Received: (from vas@localhost) by vas.tomsk.su (8.6.12/8.6.12) id MAA02809 for freebsd-questions@freebsd.org; Fri, 28 Feb 1997 12:29:18 +0700 To: freebsd-questions@freebsd.org References: <199702260926.BAA27407@freefall.freebsd.org> Message-ID: Organization: Tomsk Region Education Department From: "Victor A. Sudakov" Date: Fri, 28 Feb 97 12:29:17 +0700 X-Mailer: BML [UNIX Beauty Mail v.1.39] Subject: Re: any sh or bash gurus out there? 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... > > > > 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. Look at /usr/ports/russian/d1489 This is exactly what you need. --- Victor Sudakov http://www.tomsk.su/r/persons/vas.htm