Date: Fri, 17 Mar 2006 21:19:25 -0500 From: Parv <parv@pair.com> To: Gary Kline <kline@tao.thought.org> Cc: FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG> Subject: Re: using perl to sub § for \xa7. Message-ID: <20060318021925.GA8352@holestein.holy.cow> In-Reply-To: <20060318003815.GB19216@thought.org> References: <20060317072405.GA249@thought.org> <20060317231417.GA3230@holestein.holy.cow> <20060318003815.GB19216@thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
in message <20060318003815.GB19216@thought.org>, wrote Gary Kline thusly... > > 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? Well, shell's understanding is immaterial, but not the tool's -- perl in this case; and quite possibly tool's behaviour under currently set locale(1) -- which will be doing the substitution. > (Where is there an online map of all ISO-8859-1 keycodes? [E.g.: > an aigu is <alt>-i; it is "\xe9" in keystrokes.]) Can't say, but you can generate your own ... http://perlmonks.org/index.pl?node_id=246185 - Parv --
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060318021925.GA8352>