From owner-freebsd-questions@FreeBSD.ORG Tue Dec 2 14:49:51 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AA4A16A4CE for ; Tue, 2 Dec 2003 14:49:51 -0800 (PST) Received: from mta9.adelphia.net (mta9.adelphia.net [68.168.78.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 285F143FE0 for ; Tue, 2 Dec 2003 14:49:50 -0800 (PST) (envelope-from parv_fm@mailsent.net) Received: from moo.holy.cow ([69.160.64.204]) by mta9.adelphia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20031202224953.NOQE1561.mta9.adelphia.net@moo.holy.cow>; Tue, 2 Dec 2003 17:49:53 -0500 Received: by moo.holy.cow (Postfix, from userid 1001) id 1EBD2A8BD; Tue, 2 Dec 2003 17:53:59 -0500 (EST) Date: Tue, 2 Dec 2003 17:53:59 -0500 From: parv To: Bryan Cassidy Message-ID: <20031202225359.GA1125@moo.holy.cow> Mail-Followup-To: Bryan Cassidy , freebsd-questions@freebsd.org References: <20031201031602.GA80581@bsdjunky.homeunix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031201031602.GA80581@bsdjunky.homeunix.org> cc: freebsd-questions@freebsd.org Subject: Re: Remove ^M characters from xhtml file X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 22:49:51 -0000 in message <20031201031602.GA80581@bsdjunky.homeunix.org>, wrote Bryan Cassidy thusly... > > I've downloaded a couple of .xhtml files and they have ^M characters > all through it. I tried the col -b < name > newname command on these > files but when I do that it erases the whole document. Any ideas? Ah, a FAQ of comp.unix.* groups... http://groups.google.com/groups?q=remove+%22%5EM%22+file+group%3Acomp.unix.* It pains me not to see even a mention of sed, even though i prefer the "perl pie" solution myself. To rectify the situation... # one way to type ^M is: Ctrl-V followed by Ctrl-M sed -e 's/^M$//' old > new && mv -f new old - Parv --