The software that I use to generate the photo albums has started being annoying and inserts javascript that generates a “Built with XXX, Click here to buy a license” soft-popup in the album pages. It’s annoying as feck. I set about to do something geeky about it and came up with this:
find . -name "*.html" -execdir sed -i -n '1h;1!H;${;g;s/<script type.*CDATA*</script>//g;p;}' {} +
This little snippet checks the thousand of HTML picture slide files that I have and just removes the offending bit of HTML, all in one line that takes about 30 seconds to execute.
I love linux.
Current Mood: Amused