From owner-freebsd-questions@FreeBSD.ORG Fri Mar 17 23:36:36 2006 Return-Path: X-Original-To: freebsd-questions@FreeBSD.ORG Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BFF516A424 for ; Fri, 17 Mar 2006 23:36:36 +0000 (UTC) (envelope-from parv@pair.com) Received: from mta10.adelphia.net (mta10.adelphia.net [68.168.78.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED4EF43DA6 for ; Fri, 17 Mar 2006 23:36:25 +0000 (GMT) (envelope-from parv@pair.com) Received: from default.chvlva.adelphia.net ([69.160.66.115]) by mta10.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060317233625.SXIC8301.mta10.adelphia.net@default.chvlva.adelphia.net>; Fri, 17 Mar 2006 18:36:25 -0500 Received: by default.chvlva.adelphia.net (Postfix, from userid 1000) id D6ABEB66E; Fri, 17 Mar 2006 18:14:17 -0500 (EST) Date: Fri, 17 Mar 2006 18:14:17 -0500 From: Parv To: Gary Kline Message-ID: <20060317231417.GA3230@holestein.holy.cow> Mail-Followup-To: Gary Kline , FreeBSD Mailing List References: <20060317072405.GA249@thought.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060317072405.GA249@thought.org> Cc: FreeBSD Mailing List Subject: Re: using perl to sub § for \xa7. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2006 23:36:36 -0000 in message <20060317072405.GA249@thought.org>, wrote Gary Kline thusly... > > I've got several chapters with footnptes with that double-S > "section" character. In HTML, the code is § The thing I > want to do is use perl to s/ \xa7/§/g.....but don't know the > keycombo to /find or designate tthe hex a7 byte. Can anybody clue > me in? Use '-i' option for in place editing, '-p' to print the results to the file, '-e' to specify the code to run ... perl -pi -e 's/\xa7/§/g' file-1 file-2 file-3 ... if you have quite many files use 'find' to find the HTML files, say in directory named '/html/files' ... find /html/files -type f -name '*.html' -print0 \ | xargs -0 perl -pi -e 's/\xa7/§/g' - Parv --