From owner-freebsd-questions Tue Aug 8 13:29:28 2000 Delivered-To: freebsd-questions@freebsd.org Received: from bom.thegrid.net (xbom.thegrid.net [209.162.0.214]) by hub.freebsd.org (Postfix) with ESMTP id AC54F37B578 for ; Tue, 8 Aug 2000 13:29:21 -0700 (PDT) (envelope-from tony@thegrid.net) Received: from thegrid.net (grover.thegrid.net [192.168.2.13] (may be forged)) by bom.thegrid.net (8.9.1a/8.9.1) with ESMTP id NAA28765; Tue, 8 Aug 2000 13:29:09 -0700 (PDT) Message-ID: <399069EF.D883F30C@thegrid.net> Date: Tue, 08 Aug 2000 13:13:35 -0700 From: Tony Rini - System Administrator Organization: OneMain.Com X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Erik Trulsson Cc: Nathan Vidican , questions@freebsd.org Subject: Re: Windows ASCII files -> Unix ASCII Files References: <399069B1.1AB04AFF@wmptl.com> <20000808222146.A3443@student.uu.se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This may not be the best option but its another one. vi the file and bust a search and replace /%s/^M//g Remember to use control+v them control+m to get the ^M 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 -- Tony Rini tony@thegrid.net System Administrator Direct 805-503-7569 OneMain.Com www.onemain.com ------------------------------------------------- Your Hometown Internet ------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message