[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

SED problem

I have multiple html files. I need to remove the same chunk of code from all of them. I have made a bash loop to feed the files to sed, but am struggling with the sed code.

I need to delete all the code between

<!-- lockon:a:1


<!-- lockoff

Including the above comments.

I have tried, played with N, d substitution to // but can't pattern match across multiple lines.

Any ideas ?

In the HTML I have the following ....

<img src="pngs/whkeepsakebanner.png" title=
"keepsake cards, designers of personalised cards" alt=
"keepsake cards, designers of personalised cards"><br>

<!-- lockon:a:1: -->
<td class="toplinks"><a href="index.html">Home</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="aboutus.html">About us</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="gallery.html">Gallery</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="order.html">Order cards</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="pricing.html">Pricing</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="contactus.html">Contact
<a href="faq.html">FAQ</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=
"sitemap.html">Site map</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=
"links.html">Specialist Links</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
href="reciplinks.html">Reciprocal Links</a></td>

<!-- lockoff -->
<!-- lockon:a:2:

Reply to: