Subject: Re: '^M' in ascii files
To: <>
From: David Laight <david@l8s.co.uk>
List: netbsd-help
Date: 02/10/2002 15:27:34
Jeff Rizzo wrote:

> 
> These files must be from DOS/Windows.  UNIX-like OSes use LF as the
> newline char; DOS uses CRLF.  (The CR is what you're seeing as ^M)
> 
> Probably linux is hiding this information from you... I'm sure the
> characters are there.   Your simplest bet is to compile the "unix2dos"
> package from pkgsrc;

or in vi: :g/<ctl-V><ctl-M>/s///g
or: tr -d '\r' file >file.new && mv file.new file
or: sed -e 's/<ctl-v><ctl-m>//' file

+ others...

	David