Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Sep 1996 10:10:52 +0000 (GMT)
From:      Gabor Zahemszky <zgabor@CoDe.hu>
To:        freebsd-questions@freebsd.org
Cc:        randyd@nconnect.net
Subject:   Re: MS-DOS text files in UNIX
Message-ID:  <199609241010.KAA01418@CoDe.CoDe.hu>
In-Reply-To: <324754C2.41C67EA6@nconnect.net> from "Randall D. DuCharme" at Sep 23, 96 10:25:54 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Greetings,
>    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?  I've tried many
> things
> but nothing short of removing them one-by-one seems to work.  

What about this one:
sed -e 's/\015//' filename > filename.new ; mv filename.new filename

or
tr -d '\015' < filename > filename.new ; mv filename.new filename 

-- 
	Gabor Zahemszky <zgabor@CoDe.hu>

-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
Earth is the cradle of human sense, but you can't stay in the cradle forever.
						Tsiolkovsky



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609241010.KAA01418>