From owner-freebsd-questions Tue Aug 8 13:34:46 2000 Delivered-To: freebsd-questions@freebsd.org Received: from deepthought.granfalloon.com (gat1-825b.rochester.rr.com [24.161.82.91]) by hub.freebsd.org (Postfix) with ESMTP id 7B5FE37B5E1 for ; Tue, 8 Aug 2000 13:34:42 -0700 (PDT) (envelope-from bokonon@rochester.rr.com) Received: from localhost (caleb@localhost) by deepthought.granfalloon.com (8.9.3/8.8.7) with ESMTP id PAA20327; Tue, 8 Aug 2000 15:41:40 -0400 X-Authentication-Warning: deepthought.granfalloon.com: caleb owned process doing -bs Date: Tue, 8 Aug 2000 15:41:39 -0400 (EDT) From: Caleb Land X-Sender: caleb@deepthought.granfalloon.com To: Nathan Vidican Cc: questions@FreeBSD.ORG Subject: Re: Windows ASCII files -> Unix ASCII Files In-Reply-To: <399069B1.1AB04AFF@wmptl.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 8 Aug 2000, Nathan Vidican wrote: > Is there any sort of utility to rip the ^M characters from the end of > each line in an ASCII text file as produced by Windows? I've tried using > a simple regexp with perl, as well as using chop/chomp, but niether seem > to work, any ideas? ... > I figure there has got to be some easy way of doing this? Right now > we're FTP get/binary, then FTP put/ASCII 'ing in order to convert; which > needless to say is a pain in the neck. > Any ideas or suggestions would be helpful. > > -- > Nathan Vidican > webmaster@wmptl.com > Windsor Match Plate & Tool Ltd. > http://www.wmptl.com/ > The unix2dos port (in /usr/ports/converters) also includes dos2unix which will do the job for you (it's easy to convert a bunch of files with this program) -Caleb (bokonon@rochester.rr.com) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message