Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Apr 2002 15:49:58 -0500 (EST)
From:      Peter Leftwich <Hostmaster@Video2Video.Com>
To:        ann kok <annkok2001@yahoo.com>
Cc:        FreeBSD Questions <FreeBSD-Questions@FreeBSD.Org>
Subject:   Re: special charaters (return key)
Message-ID:  <20020403154753.B58290-100000@earl-grey.cloud9.net>
In-Reply-To: <20020403204049.63482.qmail@web20104.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 3 Apr 2002, ann kok wrote:
> Hi all - how do type the special charater? ^M (return key) - I want to remove it on the file
>
> eg [root@ann work1]# cat -v crt2.txt
> test^M
> a^M
> b^M
> c^M
> d^M
> e^M
>
> sed 's/^M//g' crt1.txt
> Thank you

The manpage for sed says there is some issue with the newline character
"\n" so this may not be the best approach to the problem.  Was crt1.txt
created in DOS or on a Mac? :)

If I were you I would use emacs or pico and simply do a search and replace.
There may be a simple command line method, perhaps using "col -b" or
something but I would be curious for a response to this too!

--
Peter Leftwich
President & Founder
Video2Video Services
Box 13692, La Jolla, CA, 92039 USA
+1-413-403-9555


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?20020403154753.B58290-100000>