[ILUG] Fw: Find&Replace Script

From: Ruairi Newman (ruairi.newman at domain eurokom.ie)
Date: Mon 23 Aug 1999 - 14:27:08 IST


More on the Find & replace q.

Regards,

Ruairi

-----Original Message-----

>Thanks all who replied.
>Unfortunately my mail is down hence I am mailing through another as I am
>up shit creek to be quite honest.
>
>now I forgot to include some additional info.
>the script needs to exclude all index.html and menu.html files. It also
>needs to appen a foot ssi comman to the bottom of the file. Which is
>also part of the problem.
>
>so say for example the document looked like the following
>
>10 <html>
>20 <head>
>30 <title>title</title></head>
>40 <body>
>50 <table with="20" >
>60 <include stuff>
>70 <all text here blah blah blah>
>80 <include stuff>
>90 </body>
>100 </html>
>
>not the top stff is allright till I get to the table on line 50 I need
>to subsitute this whict my ssi <!--#exec cmd="/path/to/my/cmd"--> now
>the script has to realise that anything in the table tag needs to be
>deleted and replace it with my ssi. i can leave the server specific stuu
>alone as it does not show up. but also it has to go to the end of the
>document just under the include (80) and put in <!--#exec
>cmd="/path/to/other/cmd"--> say for the footer.
>
>If I say run find . -type f -name \*.html -exec cmd {} \; It will
>append all files with that extension and stuff which can feck up all the
>frames pages etc (I didn't design it).
>
>Now I thought I had found a script of my dreams but the server turend
>out to be a porn sever so all out of luck at the moment.
>
>So has anyone got any ideas? I am lost not as this level of scripting is
>gone wayyyyyyy over my head. I would greatly appreciate any help you
>could give me
>
>thanks
>Richard
>



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:04:29 GMT