From owner-freebsd-questions Tue Feb 12 10:45:28 2002 Delivered-To: freebsd-questions@freebsd.org Received: from smtp.bcn.isoco.net (ldap.isoco.net [212.9.90.11]) by hub.freebsd.org (Postfix) with ESMTP id 1AD7537B404 for ; Tue, 12 Feb 2002 10:45:24 -0800 (PST) Received: from fxn.bcn.isoco.net (fxn.bcn.isoco.net [172.16.1.50]) by smtp.bcn.isoco.net (Postfix) with SMTP id 12C5ECD2B7; Tue, 12 Feb 2002 19:42:57 +0100 (CET) Date: Tue, 12 Feb 2002 19:42:56 +0100 From: F.Xavier Noria To: Per olof Ljungmark Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Off topic - Utility or shell script needed (sed or perl?) Message-Id: <20020212194256.26254e44.fxn@isoco.com> In-Reply-To: <200202121815.g1CIFbU97380@dns2.s.bonet.se> References: <200202121815.g1CIFbU97380@dns2.s.bonet.se> X-Mailer: Sylpheed version 0.7.1 (GTK+ 1.2.10; i386--freebsd4.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Tue, 12 Feb 2002 19:22:05 +0100 Per olof Ljungmark wrote: : I need a utlility or script to take out a complicated sequence of characters : from several hendred text files. : : The characters includes <>?/()= and CR-LF, but are all ASCII. If I understand correctly what needs to be done this would serve: $ perl -pi -e 'tr,<>?/()=\015\012,,d' The file would be modified in place, if you'd want a backup of each one use $ perl -pi.bak -e 'tr,<>?/()=\015\012,,d' instead. -- fxn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message