From owner-freebsd-questions Wed Apr 3 12:51: 4 2002 Delivered-To: freebsd-questions@freebsd.org Received: from russian-caravan.cloud9.net (russian-caravan.cloud9.net [168.100.1.4]) by hub.freebsd.org (Postfix) with ESMTP id 74FEB37B434 for ; Wed, 3 Apr 2002 12:50:00 -0800 (PST) Received: from earl-grey.cloud9.net (earl-grey.cloud9.net [168.100.1.1]) by russian-caravan.cloud9.net (Postfix) with ESMTP id 52D7728D21; Wed, 3 Apr 2002 15:49:58 -0500 (EST) Date: Wed, 3 Apr 2002 15:49:58 -0500 (EST) From: Peter Leftwich X-X-Sender: To: ann kok Cc: FreeBSD Questions Subject: Re: special charaters (return key) In-Reply-To: <20020403204049.63482.qmail@web20104.mail.yahoo.com> Message-ID: <20020403154753.B58290-100000@earl-grey.cloud9.net> Organization: Video2Video Services - http://Www.Video2Video.Com MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 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