From owner-freebsd-questions Wed Sep 25 04:45:33 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA17344 for questions-outgoing; Wed, 25 Sep 1996 04:45:33 -0700 (PDT) Received: from sdev.blaze.net.au (sdev.blaze.net.au [203.17.53.11]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id EAA16934 for ; Wed, 25 Sep 1996 04:45:02 -0700 (PDT) Received: from localhost (davidn@localhost) by sdev.blaze.net.au (8.7.6/8.6.9) with SMTP id VAA00641; Wed, 25 Sep 1996 21:43:36 GMT Date: Wed, 25 Sep 1996 21:43:36 +0000 () From: David Nugent To: "Randall D. DuCharme" cc: questions@FreeBSD.org Subject: Re: MS-DOS text files in UNIX In-Reply-To: <324754C2.41C67EA6@nconnect.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Mon, 23 Sep 1996, Randall D. DuCharme wrote: >I've read numerous things about adding the CR-LF back into text >files for use with DOS, but what about the other way?? Is there >a way to remove that annoying ^M from a DOS text file under >FBSD? tr -d '\015' outfile >I've tried many things but nothing short of removing them >one-by-one seems to work. Ouch. vi's global search/replace will also work fine if you have to edit it for other reasons. g:/^V^M/s///g (^V^M will look like just ^M when you type it in - the ^V "escapes" the ^M - and ^V means Ctrl-V and ^M meand Ctrl-M). David Nugent, Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-791-9547 Data/BBS +61-3-792-3507 3:632/348@fidonet davidn@blaze.net.au http://www.blaze.net.au/~davidn