[mrtg] Re: OTP: HTML coding

Isaac Grover isaac at coe.engr.sjsu.edu
Wed Feb 21 18:10:10 MET 2001


"Paul C. Williamson" wrote:

> Anyway, how can I "include" a variable in html to pull in a numeric value?
> The reason I ask is that I have a ton of indexmaker pages that have the
> current version of MRTG, but that is outdated when I move to a new version.
> Right now, I go through and change about 100 different html files with thes
>  tring "version x.x.x" with "version x.x.x+1" or whatever.  You get the
> idea.  What I would like is a variable that contains that info, so all I have
> to do is change that one file.

I've already seen an awk solution come through the list, but there's always more
than one way to do it so I'll submit my (preferred) perl solution:

perl -p -i.backup -e 's/2.8.12/2.9.9/g' *.html

It's short & sweet, and it leaves behind *.html.backup files just in case you
make a mistake.  =)

BTW, here's where I picked up this perl one-liner:
http://igloo.its.unimelb.edu.au/Webmail/unixtips/msg00335.html


--
Isaac Grover - isaac at coe.engr.sjsu.edu
SJSU College of Engineering, ECS / Networking
ENG 237, (408) 924-3893


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list