From owner-freebsd-questions Wed Apr 3 18:50:27 2002 Delivered-To: freebsd-questions@freebsd.org Received: from wonkity.com (wonkity.com [63.93.4.4]) by hub.freebsd.org (Postfix) with ESMTP id A36E437B417 for ; Wed, 3 Apr 2002 18:50:12 -0800 (PST) Received: from wonkity.com (localhost.wonkity.com [127.0.0.1]) by wonkity.com (8.12.1/8.11.6) with ESMTP id g342oBuF077053; Wed, 3 Apr 2002 19:50:11 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.12.1/8.12.1/Submit) with ESMTP id g342oB6M077050; Wed, 3 Apr 2002 19:50:11 -0700 (MST)?g (envelope-from wblock@wonkity.com) Date: Wed, 3 Apr 2002 19:50:11 -0700 (MST) From: Warren Block To: Peter Leftwich Cc: FreeBSD Questions Subject: Re: special charaters (return key) In-Reply-To: <20020403203320.X70185-100000@earl-grey.cloud9.net> Message-ID: 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, Peter Leftwich wrote: > On Wed, 3 Apr 2002, Warren Block wrote: > > perl -pi -e 's/\r//g' crt1.txt > > 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 :) Erik did an excellent job explaining it. I'll add two other things: 1. The "g" flag after the final slash means to substitute all occurrences ("global") instead of just the first one. 2. The llama or camel O'Reilly books pay for themselves quickly. I prefer the first; most of the reference information I need from the camel book is in the man pages. -Warren Block * Rapid City, South Dakota USA To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message