From owner-freebsd-questions Wed Apr 3 17:34:59 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 AB79E37B417 for ; Wed, 3 Apr 2002 17:34:57 -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 56C9228D13; Wed, 3 Apr 2002 20:34:57 -0500 (EST) Date: Wed, 3 Apr 2002 20:34:57 -0500 (EST) From: Peter Leftwich X-X-Sender: To: Warren Block Cc: ann kok , FreeBSD Questions Subject: Re: special charaters (return key) In-Reply-To: Message-ID: <20020403203320.X70185-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, Warren Block wrote: > On Wed, 3 Apr 2002, ann kok wrote: > > how do type the special charater? ^M (return key) I want to remove it on the file > > sed 's/^M//g' crt1.txt > Seems like last time I wanted to do this, the BSD sed didn't understand that a \r should be a return. Perl does, though: > perl -pi -e 's/\r//g' crt1.txt > -Warren Block * Rapid City, South Dakota USA This was going to be part of my suggested rememdy (i.e. to use perl) but it seemed too complex. The manpage for "perl" doesn't mention -pi nor does it mention -e; Could you explain what this command does? I think there should be a simple command to change a file into one long line :) -- 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