Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Sep 1996 21:43:36 +0000 ()
From:      David Nugent <davidn@sdev.blaze.net.au>
To:        "Randall D. DuCharme" <randyd@nconnect.net>
Cc:        questions@FreeBSD.org
Subject:   Re: MS-DOS text files in UNIX
Message-ID:  <Pine.BSF.3.95.960925214043.462D-100000@sdev.blaze.net.au>
In-Reply-To: <324754C2.41C67EA6@nconnect.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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' <infile >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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.960925214043.462D-100000>