Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 May 2012 22:02:24 +0200
From:      Polytropon <freebsd@edvax.de>
To:        "Michael Ross" <gmx@ross.cx>
Cc:        Tim Dunphy <bluethundr@gmail.com>, freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: eliminate character with sed
Message-ID:  <20120520220224.08f23b38.freebsd@edvax.de>
In-Reply-To: <op.wemfkde9g7njmm@michael-think>
References:  <CAOZy0enEPQNFrJv-xZ-H5_18_r5rvjHQQCeFQT6x26TGTf0c0g@mail.gmail.com> <op.wemfkde9g7njmm@michael-think>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 20 May 2012 21:10:51 +0200, Michael Ross wrote:
> Maybe you can use /usr/ports/converters/dosunix.
> 
> 	Usage:
> 	  dosunix INPUTFILE OUTPUTFILE
> 
> 	DosUnix converts files from DOS text format to Unix text format
> 	by replacing each carriage return & newline pair with a single
> 	newline character.
> 
> does not do backups, though.

If more complex conversions (including character sets) is
needed (which often is the case for non-US "Windows" files),
the "recode" port is very useful:

	% recode cp437..iso8859-1 <file>

It also doesn't do backups, which would be required to do
using a surrounding script.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



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