From owner-freebsd-questions@FreeBSD.ORG Fri Jan 16 06:45:23 2004 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 8A20916A4CE for ; Fri, 16 Jan 2004 06:45:23 -0800 (PST) Received: from razorbill.mail.pas.earthlink.net (razorbill.mail.pas.earthlink.net [207.217.121.248]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69E4C43D2D for ; Fri, 16 Jan 2004 06:45:22 -0800 (PST) (envelope-from algould@datawok.com) Received: from 22-15.lctv-b4.cablelynx.com ([24.204.22.15] helo=yoda.datawok.com) by razorbill.mail.pas.earthlink.net with asmtp (TLSv1:RC4-MD5:128) (Exim 3.33 #1) id 1AhVDr-0004pl-00; Fri, 16 Jan 2004 06:45:19 -0800 From: "Andrew L. Gould" To: Evan Sayer Date: Fri, 16 Jan 2004 08:45:23 -0600 User-Agent: KMail/1.5.4 References: <29AAE3F4-47D1-11D8-946B-000A95CCF8C4@san.rr.com> <20040116073526.P602@grond.sourballs.org> In-Reply-To: <20040116073526.P602@grond.sourballs.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401160845.23141.algould@datawok.com> X-ELNK-Trace: ee791d459e3d6817d780f4a490ca69564776905774d2ac4b9c7435ba5699c4c957a320f49aad4293350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c cc: freebsd-questions@freebsd.org Subject: Re: your mail 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: Fri, 16 Jan 2004 14:45:23 -0000 On Friday 16 January 2004 07:45 am, David Fleck wrote: > On Thu, 15 Jan 2004, Evan Sayer wrote: > > FreeBSD- > > Please help, this is really important. I was told that i could get rid > > of the ^m symbols at the end of the lines in my web page's html code > > by using sed. They said to execute sed "s//^m^m" index.html > > > index.html or something like that. This got rid of everything in the > > file. I really need this back, so any help would be greatly > > appreciated. > In Windows, the end of a line is represented by the carriage return and the new line characters. Unix uses only the new line character. Although the carriage return is usually keyed as '\r', I've noticed that it appears as "^M" in certain editors. One of the safest ways to convert between Windows and Unix formats is to use the unix2dos port at /usr/ports/converters/unix2dos. The port installs the executable files unix2dos and dos2unix. To convert a Windows file to Unix (to remove "^M" from the end of each line, execute: dos2unix To convert a Unix file to Windows (to add "^M" to the end of each line), execute: unix2dos This way, you will not risk mistyping code that is gibberish to non-scripters. Best of luck, Andrew Gould