[mrtg] Re: OTP: HTML coding

Mark Campbell mark at uis.co.za
Wed Feb 21 16:21:57 MET 2001


Try something like;


awk '{ sub(/!entrytobereplaced!/, "!wanted entry!"); print }' !filename! >
!outputfilename!


Omit the !

Hope it helps!!!


-----Original Message-----
From: Edward Hartman [mailto:Networks at TopService.com]
Sent: Wednesday, February 21, 2001 5:09 PM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] Re: OTP: HTML coding



Assuming "version x.x.x" is a unique string in your code, can you go to the 
html source code and do a search & replace?  It is tedious to do this 
manually.  I think unix has commands to search specific files within a 
directory, search for string (x) within those files and change string (x) 
to string (y)?  I know grep can search for strings within files, but I 
don't know if it can replace strings.  Maybe it would take a few commands 
working together.  If I had sufficient unix experience, I would know for 
sure.

Can any unix gurus add a comment?  If you find the command string, please 
let me know.

-Eddie

At 08:57 AM 2/21/01 -0500, Paul C. Williamson wrote:

>Hi all,
>
>I realize this is off topic, but there seem to be quite a few experts in
the
>area of html coding here...
>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.
>
>As always, any pointers, advice, links to other websites, etc. is
appreciated,
>
>Paul
>
>
>--
>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


--
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

--
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