Date: Fri, 4 Apr 1997 16:50:33 +0200 (MET DST) From: Robert Eckardt <roberte@mep.ruhr-uni-bochum.de> To: joki@shire.domestic (Joachim Kuebart) Cc: questions@freebsd.org Subject: Re: Removing DOS's ^M Message-ID: <199704041450.QAA11267@gluon.mep.ruhr-uni-bochum.de> In-Reply-To: <199704041308.PAA00627@shire.domestic> from Joachim Kuebart at "4. Apr. 97 15:07:45"
next in thread | previous in thread | raw e-mail | index | archive | help
> There used to be a utility to do that, something like a filter called crlf or so, but I can't find that. > > For now, to convert Text files (that do NOT contain any other control characters apart from ^M and newline), you can use > > cat -v filename | sed 's/^M//' > outfilename > > alternatively to EMACS, which is Eight Megabytes and Constantly Swapping. > Maybe even sed offers a better way, but this is what comes to my mind :-) Try tr -d '\r' <filename >outfilename ~~ = <Ctrl-V><Ctrl-Z> This will work also for files which contain other control chars. Robert -- Dr. Robert Eckardt ( Ruhr-Universitaet Bochum, Inst.f.Theor.Physik, NB6/169 ) Universitaetsstrasse 150, D-44780 Bochum, Germany ----X---8---- Telefon: +49 234 700-3709, Telefax: +49 234 7094-574 8 E-Mail: RobertE@MEP.Ruhr-Uni-Bochum.de --------8---- URL: http://WWW.MEP.Ruhr-Uni-Bochum.de/~roberte >>> To be successful one needs friends, <<< >>> To be very successful one needs enemies. <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704041450.QAA11267>