From owner-freebsd-questions Tue Aug 8 13:27:41 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.telestream.com (mail.telestream.com [205.238.4.5]) by hub.freebsd.org (Postfix) with ESMTP id B1DE937B735 for ; Tue, 8 Aug 2000 13:27:37 -0700 (PDT) (envelope-from keith@mail.telestream.com) Received: from localhost (keith@localhost) by mail.telestream.com (8.9.3/8.9.3) with ESMTP id NAA24417; Tue, 8 Aug 2000 13:27:25 -0700 Date: Tue, 8 Aug 2000 13:27:25 -0700 (PDT) From: To: Erik Trulsson Cc: Nathan Vidican , questions@FreeBSD.ORG Subject: Re: Windows ASCII files -> Unix ASCII Files In-Reply-To: <20000808222146.A3443@student.uu.se> 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 I usualy just use vi for this :%s/^M//g Where ^M is accomplished by pressing ctrl+v then lifting finger off the v and pressing m while holding down ctrl still. Keith ================================= Keith W. At the helm My non work related site www.cydonia.net ================================= On Tue, 8 Aug 2000, Erik Trulsson wrote: > On Tue, Aug 08, 2000 at 04:12:33PM -0400, 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. > > > > Why not use tr(1)? > Example: > > tr -d '\r' < infile > outfile > > > That is probably the simplest soulution. > > -- > > Erik Trulsson > ertr1013@student.uu.se > > > > 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