Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 May 2002 00:41:49 -0500
From:      scottro@despammed.com
To:        shubhamr <shubhamr@malkauns.nsc.com>
Cc:        "questions@FreeBSD.ORG" <questions@FreeBSD.ORG>
Subject:   Re: such a pain
Message-ID:  <20020505054149.GA2060@scott1.homeunix.net>
In-Reply-To: <3CD4B6D2.9858CAE0@malkauns.nsc.com>
References:  <3CD4B6D2.9858CAE0@malkauns.nsc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <filename>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020505054149.GA2060>