From owner-freebsd-questions Wed Aug 9 23:35:53 2000 Delivered-To: freebsd-questions@freebsd.org Received: from 2711.dynacom.net (2711.dynacom.net [206.107.213.3]) by hub.freebsd.org (Postfix) with ESMTP id A133B37B64F for ; Wed, 9 Aug 2000 23:35:49 -0700 (PDT) (envelope-from kstewart@urx.com) Received: from urx.com (dsl1-160.dynacom.net [206.159.132.160]) by 2711.dynacom.net (Build 101 8.9.3/NT-8.9.3) with ESMTP id XAA01826; Wed, 09 Aug 2000 23:35:43 -0700 Message-ID: <39924D3F.97F688F3@urx.com> Date: Wed, 09 Aug 2000 23:35:43 -0700 From: Kent Stewart Reply-To: kstewart@urx.com Organization: Dynacom X-Mailer: Mozilla 4.74 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Kisanak Cc: questions@FreeBSD.ORG Subject: Re: ^M References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Kisanak wrote: > > Yes, I did ftping it in ASCII mode, but still doesn't work. > Finally, it works with tr -d "\r" < test.txt > test2.txt > > but it never works with: > load the file with vi. execute the following command... > :1,$s,,,g > > It seems that there's no visual feature while editing > using vi in freebsd, but in linux I can use visual or visual > block features. any idea?. Well, I transfered one of my Windows 2000 index.html's to my FreeBSD system in binary mode and this is what I got. ^M ^M ^M ^M ^M ^M Kent Stewart's Home Page^M There was a screen full of this. I thought that was visual mode :). From col 1 on line one I typed in :.,$s/^M//g and my screen converted to Kent Stewart's Home Page 's in the file. Kent > > Thanks for any helps. > regards, > Kisanak. > > -----Original Message----- > From: Matthew Emmerton [mailto:matt@gsicomp.on.ca] > > If you're FTPing the files, be sure to transfer them in ASCII mode. This > will enforce the proper end-of-line translation between DOS and UNIX. > > Otherwise, use the following command to strip ^Ms: > > tr -d "\r" < test.txt > test2.txt > > where "test.txt" is the file with the "^M" characters, and test2.txt is a > new file without them. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- Kent Stewart Richland, WA mailto:kbstew99@hotmail.com http://kstewart.urx.com/kstewart/index.html FreeBSD News http://daily.daemonnews.org/ Bomber dropping fire retardant in front of Hanford Wild fire. http://kstewart.urx.com/kstewart/bomber.jpg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message