From owner-freebsd-questions Thu Jun 7 19:51: 8 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail8.carolina.rr.com (fe8.southeast.rr.com [24.93.67.55]) by hub.freebsd.org (Postfix) with ESMTP id DBA4A37B405 for ; Thu, 7 Jun 2001 19:51:01 -0700 (PDT) (envelope-from jconner@enterit.com) Received: from CONCON.enterit.com ([24.88.181.33]) by mail8.carolina.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Thu, 7 Jun 2001 22:50:43 -0400 Message-Id: <5.1.0.14.0.20010607230633.0243f6b8@mail.enterit.com> X-Sender: jconner@enterit.com@mail.enterit.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 07 Jun 2001 23:11:43 -0400 To: "Mark Sergeant" From: Jim Conner Subject: Re: __ how to eliminate "^M" in ASCII files. Cc: Jason Oakley , freebsd-questions@FreeBSD.ORG In-Reply-To: <200106080225.f582Peh25860@xyzzy.intranet.snsonline.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 $ $(locate dos2unix | head -1) file1 > file2 or $ sed 's/\015//g' file1 > file2 :) - Jim At 09:25 PM 6/7/2001 -0500, Mark Sergeant wrote: >I use this... > >#!/bin/sh >echo "" >echo "Removing Windows silly ^M's for the following files..." >echo "" >for file in $*; do > echo ---- $file > tr -d "\015" < $file > $file.$$ > cp $file.$$ $file > rm -f $file.$$ >done >echo "" >exit 0 > >Works wonderfully and can do many files at once. > >Cheers, > >Mark > >On Fri, 8 Jun 2001 12:20:38 +1000 (EST), Jason Oakley said: > > > save them with UNIX line ends (A handy feature of Arachnophilia > > www.arachnoid.com). Or do a search and replace in your favourite text > > editor. > > > > VI: > > > > %s/^V^M//g > > > > > > On Fri, 8 Jun 2001, bsdnewbie bsdnewbie wrote: > > > > ]:Is there any tool can eliminate "^M" in text files? > > ]:Thanks in advance. > > ]: > > ]:best regards, > > ]:steven > > > ]:_________________________________________________________________________ > > ]:Get Your Private, Free E-mail from MSN Hotmail at > http://www.hotmail.com. > > ]: > > ]: > > ]:To Unsubscribe: send mail to majordomo@FreeBSD.org > > ]:with "unsubscribe freebsd-questions" in the body of the message > > ]: > > > > > > ---------------------------- > > You should be Banging Rocks! > > http://www.bangrocks.com > > _ > > .oO(_)Oo. > > > > I'd far rather be happy > > than right, any day. > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > > > > >-- >Mark Sergeant >Unix Systems Administrator > >Fortune follows... > >Chicago Transit Authority Rider's Rule #36: > Never ever ask the tough looking gentleman wearing El Rukn >headgear where he got his "pyramid powered pizza warmer". > -- Chicago Reader 3/27/81 > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message - Jim - NOTJames - jconner@enterit.com - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - | Today's errors, in contrast: | - | Windows - "Invalid page fault in module kernel32.dll at 0032:A16F2935" | - | UNIX - "segmentation fault - core dumped" | - | Humans - "OOPS, I've fallen and I can't get up" | - -------------------------------------------------------------------------- - (To view this properly use a non-proportional font in your MUA) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message