Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 2007 22:31:04 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Gary Kline <kline@tao.thought.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: perl substitution question
Message-ID:  <20070114203104.GB3404@kobe.laptop>
In-Reply-To: <20070114201546.GA28048@thought.org>
References:  <20070114024551.GA21847@thought.org> <20070114034148.GC2734@kobe.laptop> <20070114201546.GA28048@thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2007-01-14 12:15, Gary Kline <kline@tao.thought.org> wrote:
> Thanks for all the ways, gents.  (I never thought of tr, but now that
> seems like an option.)  A week+ ago I tried perl using 's/\xNN/"/g'
> from the cmdline, but nojoy.  The online docs said that \N{xx} would
> catch a hex character; that's what was fuzzy.

Watch out for shells with funny 'expansion rules', like csh(1) :)

Even in sh(1) variants, it's always a good idea to save the Perl script
in a file first, and test it independently of the shell, with:

	perl filter.pl < infile > outfile

To avoid all the messy details about single-quotes, double-quotes,
backquotes, stars, dollars, etc :)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070114203104.GB3404>