Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jun 2003 00:01:01 +0100
From:      Jez Hancock <jez.hancock@munk.nu>
To:        questions@FreeBSD.org
Subject:   Re: tr
Message-ID:  <20030620230101.GC27738@users.munk.nu>
In-Reply-To: <Pine.LNX.4.44.0306201342350.30007-100000@ns.isi.ulatina.ac.cr>
References:  <Pine.LNX.4.44.0306201342350.30007-100000@ns.isi.ulatina.ac.cr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 20, 2003 at 01:44:37PM -0600, Fabio Miranda Hamburger wrote:
> How can I remove annoy "^D" end of line from MS systems?
> I know there is an utility called dos2unix.
> But I think It's possible to do it with freebsd tr.
> How would that be?
As well as the method mentioned in the replies above, you can also 
do this with 'col':

cat file | col -bx > tmp.txt && mv tmp.txt file

One annoying feature of this though is it changes tabs to spaces.

Yet another way is to do a global search/replace in vim:
:%s/
//g
(note this is ctrl-v-m, not ^(caret symbol) m!)

There are a lot of other ways too :)



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