From owner-freebsd-questions@FreeBSD.ORG Sat Mar 18 00:38:17 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 EF91F16A401 for ; Sat, 18 Mar 2006 00:38:17 +0000 (UTC) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A10B43D46 for ; Sat, 18 Mar 2006 00:38:17 +0000 (GMT) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (localhost [127.0.0.1]) by tao.thought.org (8.13.4/8.13.1) with ESMTP id k2I0cFLW019362; Fri, 17 Mar 2006 16:38:16 -0800 (PST) (envelope-from kline@tao.thought.org) Received: (from kline@localhost) by tao.thought.org (8.13.4/8.13.1/Submit) id k2I0cFFZ019361; Fri, 17 Mar 2006 16:38:15 -0800 (PST) (envelope-from kline) Date: Fri, 17 Mar 2006 16:38:15 -0800 From: Gary Kline To: Gary Kline , FreeBSD Mailing List Message-ID: <20060318003815.GB19216@thought.org> References: <20060317072405.GA249@thought.org> <20060317231417.GA3230@holestein.holy.cow> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060317231417.GA3230@holestein.holy.cow> User-Agent: Mutt/1.4.2.1i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing 19+ years of service to the Unix community Cc: 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: Sat, 18 Mar 2006 00:38:18 -0000 On Fri, Mar 17, 2006 at 06:14:17PM -0500, Parv wrote: > 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 > Yeah, this is what I use for most cmd-line subs, but will a literal "\xa7" be interpreted by the shell as the section character? (Where is there an online map of all ISO-8859-1 keycodes? [E.g.: an aigu is -i; it is "\xe9" in keystrokes.]) > > ... 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' > > Thanks. I've still got does dozens of files/chapters. X-| :) gary > - Parv > > -- > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Gary Kline kline@thought.org www.thought.org Public service Unix