From owner-freebsd-questions Thu Jun 7 19:26:53 2001 Delivered-To: freebsd-questions@freebsd.org Received: from xyzzy.intranet.snsonline.net (dhcp.looksmart.com.au [202.53.47.178]) by hub.freebsd.org (Postfix) with ESMTP id 937FF37B405 for ; Thu, 7 Jun 2001 19:26:48 -0700 (PDT) (envelope-from msergeant@snsonline.net) Received: from xyzzy.intranet.snsonline.net (localhost [127.0.0.1]) by xyzzy.intranet.snsonline.net (8.11.3/8.11.3) with SMTP id f582Peh25860; Fri, 8 Jun 2001 12:25:46 +1000 (EST) (envelope-from msergeant@snsonline.net) Message-Id: <200106080225.f582Peh25860@xyzzy.intranet.snsonline.net> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "Mark Sergeant" To: Jason Oakley Cc: freebsd-questions@FreeBSD.ORG Subject: Re: __ how to eliminate "^M" in ASCII files. X-Mailer: Pronto v2.2.5 On freebsd/mysql Date: 07 Jun 2001 21:25:39 EST Reply-To: "Mark Sergeant" In-Reply-To: References: 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 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