0

I'd like to remove a series of elements like:

div-id="st-head" class="noprint"

from a html file.

  • 1
    Show example input with corresponding output please – Scony Mar 16 '14 at 02:02
  • Yes please cite a couple of the situations where this code is contained in these files. Otherwise this isn't much to go on. – slm Mar 16 '14 at 02:03

1 Answers1

1

If all you want is to delete that exact string and don't care where it's found or anything about context at all, just do this:

sed -i.bak 's/div-id="st-head" class="noprint"//g' a.html b.html c.html

That will remove every occurrence of that string from each html file listed and a copy of the original called [filename.html].bak.

terdon
  • 242,166