S
Slain
I have a big list of HTML files, which need to be updated with a
common text.
<script language=JavaScript
src="./highlight.js"></script>
I need to add the above line in each of the html files, before the
text "<\head>". All the HTML files have this text and I think some
kind of search on this string and either replacing "</head>" with the
text above and appending "<\head> to it, might be one way to do it or
just find the <\head> part and insert the text before that.
On similar lines, the text below goes towards the end. The problem is
similar to the above one and I think all that needs to be done, is
read the text below from a file, do a similar search for some text
below which this insert part should go and put it there.
<p><script type="text/javascript">var mailSubject = 'Hardware
Overview';
var mailBody = 'Your Technical Support Team hopes this topic will
be helpful: ' + location.href;
var mailDisplay = 'Click here to email this topic.';
document.write(
'<a href="mailto:[email protected]'
+ '?subject=' + escape(mailSubject)
+ '&body=' + escape(mailBody)
+ '">' + mailDisplay + '</a>'
);</script></p>
<script type="text/javascript"
language=JavaScript1.2><!--
beginSearch ();
//--></script>
Any ideas would be helpful. I do not know much about perl and hence
the more the better.
Thanks a lot
common text.
<script language=JavaScript
src="./highlight.js"></script>
I need to add the above line in each of the html files, before the
text "<\head>". All the HTML files have this text and I think some
kind of search on this string and either replacing "</head>" with the
text above and appending "<\head> to it, might be one way to do it or
just find the <\head> part and insert the text before that.
On similar lines, the text below goes towards the end. The problem is
similar to the above one and I think all that needs to be done, is
read the text below from a file, do a similar search for some text
below which this insert part should go and put it there.
<p><script type="text/javascript">var mailSubject = 'Hardware
Overview';
var mailBody = 'Your Technical Support Team hopes this topic will
be helpful: ' + location.href;
var mailDisplay = 'Click here to email this topic.';
document.write(
'<a href="mailto:[email protected]'
+ '?subject=' + escape(mailSubject)
+ '&body=' + escape(mailBody)
+ '">' + mailDisplay + '</a>'
);</script></p>
<script type="text/javascript"
language=JavaScript1.2><!--
beginSearch ();
//--></script>
Any ideas would be helpful. I do not know much about perl and hence
the more the better.
Thanks a lot