Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jun 2001 11:11:02 -0400 (EDT)
From:      Ken Nagorski <kenn@pcintelligent.com>
To:        Alex Dyas <ADyas@twowaytv.com>
Cc:        David Leimbach <dleimbac@earthlink.net>, questions@FreeBSD.ORG
Subject:   RE: __ how to eliminate "^M" in ASCII files.
Message-ID:  <Pine.LNX.4.21.0106081102360.1064-100000@web.pcintelligent.com>
In-Reply-To: <911D8F660DF6D411B61F00500462BA019261CC@EXCHANGE>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi there,

	How about vi anyone?

	:%s/^M//g

	Let me explain that. 

	While not in insert mode hit :%s/
	Then hold donw the control key and hit v (crtl +v)
        This tells vi/sed that the next charater coming is a control char
	While still holding down the control key hit m 
	then hit //g
	this say replace it ith nothing globally.

I hoped that helped, please remeber if you aren't using vi you shouldn't
be using Unix :)

Ken!

On Fri, 8 Jun 2001, Alex Dyas wrote:

> > cat file | tr '\015' ' '
> > 
> > all ^M replaced with spaces... maybe not the best example.
> 
> cat file | tr -d '\015'
> 
> gets rid of them.
> 
> alex...
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 

-- 
IMPORTANT: This email is intended for the use of the individual addressee(s)
named above and may contain information that is confidential, privileged
or unsuitable for overly sensitive persons with low self-esteem, no sense 
of humour or irrational religious beliefs. If you are not the intended 
recipient, any dissemination, distribution or copying of this email is not 
authorised (either explicitly or implicitly) and constitutes an irritating 
social faux pas. 

Unless the word absquatulation has been used in its correct context somewhere
other than in this warning, it does not have any legal or no grammatical use 
and may be ignored. No animals were harmed in the transmission of this email, 
although the kelpie next door is living on borrowed time, let me tell you. 
Those of you with an overwhelming fear of the unknown will be gratified to 
learn that there is no hidden message revealed by reading this warning
 backwards, so just ignore that Alert Notice from Microsoft. 

However, by pouring a complete circle of salt around yourself and your 
computer you can ensure that no harm befalls you and your pets. If you 
have received this email in error, please add some nutmeg and egg whites, 
whisk and place in a warm oven for 40 minutes. 


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?Pine.LNX.4.21.0106081102360.1064-100000>