From owner-freebsd-questions Tue Dec 25 18:58:13 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mobil.cz (diana.mobil.cz [195.39.16.12]) by hub.freebsd.org (Postfix) with ESMTP id C9ED037B405 for ; Tue, 25 Dec 2001 18:58:09 -0800 (PST) Received: from ester.mobil.cz (ester.mobil.cz [194.213.62.23]) by mobil.cz (8.11.6/8.11.0) with ESMTP id fBQ2w8f18815 for ; Wed, 26 Dec 2001 03:58:08 +0100 Received: from roman.mobil.cz ([10.2.0.89]) by ester.mobil.cz (Lotus Domino Release 5.0.7) with ESMTP id 2001122603564126:2630 ; Wed, 26 Dec 2001 03:56:41 +0100 Received: (from roman@localhost) by roman.mobil.cz (8.11.6/8.11.6) id fBQ36fN39720 for questions@FreeBSD.ORG; Wed, 26 Dec 2001 04:06:41 +0100 (CET) (envelope-from neuhauser@mobil.cz) X-Authentication-Warning: roman.mobil.cz: roman set sender to neuhauser@mobil.cz using -f Date: Wed, 26 Dec 2001 04:06:41 +0100 From: Roman Neuhauser To: FBSD Questions Subject: Re: Dos -> Unix end-of-line conversion Message-ID: <20011226040641.I850@roman.mobil.cz> Mail-Followup-To: FBSD Questions References: <20011226113216.A24782@grimoire.chen.org.nz> Mime-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.3.23i X-MIMETrack: Itemize by SMTP Server on ester/Mobil(Release 5.0.7 |March 21, 2001) at 12/26/2001 03:56:41 AM, Serialize by Router on ester/Mobil(Release 5.0.7 |March 21, 2001) at 12/26/2001 03:56:47 AM, Serialize complete at 12/26/2001 03:56:47 AM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > From: "Joe & Fhe Barbish" > To: "Jonathan Chen" > Cc: "FBSD Questions" > Subject: RE: Dos -> Unix end-of-line conversion > Date: Tue, 25 Dec 2001 20:51:01 -0500 > > How can I get this command to roll through a directory tree processing all > the files to feed this $ tr -d '\r' < oldfile > newfile command converting > dos2unix or unix2dos? There is a dos2unix / unix2dos port but it only does > one file at a time. By plugging it into find(1): find /somewhere -iregex '.*\.txt' -exec tr -d '\r' < {} > {}.new \; > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Jonathan Chen > Sent: Tuesday, December 25, 2001 5:32 PM > To: Michal Pasternak > Cc: freebsd-questions@FreeBSD.ORG > Subject: Re: Dos -> Unix end-of-line conversion > > On Tue, Dec 25, 2001 at 11:24:41PM +0100, Michal Pasternak wrote: > > Hello, > > > > are there any programs (in baseinstall) which allow that (except perl)? > > $ tr -d '\r' < oldfile > newfile > > is one quick and dirty way to do it... > -- > Jonathan Chen > ----------------------------------------------------------------------- > "I love deadlines. I like the whooshing sound they make as they fly by" > - Douglas Adams > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- FreeBSD 4.4-STABLE 4:04AM up 4 days, 34 mins, 9 users, load averages: 0.04, 0.02, 0.00 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message