From owner-freebsd-questions Sat May 4 21:41:56 2002 Delivered-To: freebsd-questions@freebsd.org Received: from nycsmtp1out.rdc-nyc.rr.com (nycsmtp1out.rdc-nyc.rr.com [24.29.99.226]) by hub.freebsd.org (Postfix) with ESMTP id A15F737B41A for ; Sat, 4 May 2002 21:41:53 -0700 (PDT) Received: from smtp-server.nyc.rr.com (24-168-24-239.nyc.rr.com [24.168.24.239]) by nycsmtp1out.rdc-nyc.rr.com (8.12.1/Road Runner SMTP Server 1.0) with SMTP id g454e3o0002588; Sun, 5 May 2002 00:40:03 -0400 (EDT) Received: by smtp-server.nyc.rr.com (sSMTP sendmail emulation); Sun, 5 May 2002 00:41:49 -0500 Date: Sun, 5 May 2002 00:41:49 -0500 From: scottro@despammed.com To: shubhamr Cc: "questions@FreeBSD.ORG" Subject: Re: such a pain Message-ID: <20020505054149.GA2060@scott1.homeunix.net> References: <3CD4B6D2.9858CAE0@malkauns.nsc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3CD4B6D2.9858CAE0@malkauns.nsc.com> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, May 05, 2002 at 10:06:34AM +0530, shubhamr wrote: > Hi, > I have some .c files which I got from my windows machine.But when I read > it on BSD,for every line end ^M shows up,whereever there is a > newline(carriage return).It is tedious to remove them manually.I have no > X installed on my BSD.Can anyone suggest how to get rid of them? > > shubha In BSD, open the file with the vi editor vi Once you have it there type :%s/ctrl +V ctrl+ M//g That will do it. The ctrl + V tells it to enter the next character literally---otherwise, the ctrl + M wouldn't show up. HTH Scott Robbins To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message