Date: Fri, 16 Jan 2004 08:45:23 -0600 From: "Andrew L. Gould" <algould@datawok.com> To: Evan Sayer <esayer1@san.rr.com> Cc: freebsd-questions@freebsd.org Subject: Re: your mail Message-ID: <200401160845.23141.algould@datawok.com> In-Reply-To: <20040116073526.P602@grond.sourballs.org> References: <29AAE3F4-47D1-11D8-946B-000A95CCF8C4@san.rr.com> <20040116073526.P602@grond.sourballs.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <filename> To convert a Unix file to Windows (to add "^M" to the end of each line), execute: unix2dos <filename> This way, you will not risk mistyping code that is gibberish to non-scripters. Best of luck, Andrew Gould
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401160845.23141.algould>