0

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

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

from a html file.

2
  • 1
    Show example input with corresponding output please
    – Scony
    Commented Mar 16, 2014 at 2: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
    Commented Mar 16, 2014 at 2:03

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .