substitution problems using perl
Nate
catenate at yahoo.com
Mon Nov 8 17:23:41 CST 1999
On the Jax.PM jacksonville-pm-list;
Nate <catenate at yahoo.com> wrote -
--- j proctor <jproctor at oit.umass.edu> wrote:
> On the Jax.PM jacksonville-pm-list;
> j proctor <jproctor at oit.umass.edu> wrote -
>
> > P.S. Here's an interesting one: what if I wanted to save the
> matched
> > number, and increment it by one?
> > Something like:
> > c:\>perl -pi.bak -e 's/^(\t\t9\d*)$/"$1++"/e' COMCITY.zone
> You actually have a slightly more complicated
> question;
> if I were writing such a tool, I'd probably not try to run it in
> place
> from the command line, and add some logic to update the date-stamp
> part of
> the serial number, too.
I actually was doing this from the command line so that I could do
this:
c:\>perl -pi.bak -e 's/^\t\t(9\d*)$/$1++/' *.zone
and use the shell's wildcard features, trying to keep this just a quick
script. Of course, once I had to debug it it was no longer a quick
command line script!
Thanks again, guys.
=====
nate catenate at yahoo.com
my infosec favorites -> www.geocities.com/catenate/
There is no time BUT now.
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com
The Jacksonville Perl Monger's Group is operated by -
Bill -Sneex- Jones ( sneex at usa.net ),
to whom send all praises, complaints, or comments...
More information about the Jacksonville-pm
mailing list