Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Nov 2001 21:42:09 -0800
From:      Sean Ellis <sellis@telus.net>
To:        freebsd-questions@FreeBSD.ORG
Cc:        David Loszewski <stealth215@mediaone.net>
Subject:   Re: ^M on end of lines
Message-ID:  <169116798405.20011103214209@telus.net>
In-Reply-To: <20011103210452.A44499-100000@localhost>
References:  <20011103210452.A44499-100000@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello David,

Saturday, November 03, 2001, 9:05:23 PM, you wrote:

> On Sat, 3 Nov 2001, David Loszewski wrote:

>> So then how do I strip it of the '^M's then?

> You can remove the ^M's from a file with:

> perl -pi -e 's/\cM//g' filename

or open the file with vim. You should see '[dos]' in the status line.
Type

   :set fileformat=unix
   
and save your new de-^M'ed file.

Or do

tr -d '\015' < file > newfilename

from the command line,


-- 
Best regards,
 Sean                            mailto:sellis@telus.net



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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