Skip to content
The beaver is a proud and noble animal

The beaver is a proud and noble animal

Notes from a bemused canuck

  • Home
  • About
  • Bookmarks
  • Pictures
  • Resume
  • Wine
  • Random Recipe
  • Toggle search form

I love unix one-liners

Posted on August 14, 2013August 14, 2013 By admin

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.

  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to email a link to a friend (Opens in new window) Email
uncategorized Tags:geek

Post navigation

Previous Post: Lavaux Vineyards
Next Post: More naked sushi

Related Posts

  • Sometimes I’m a grown-up, other times… less so geek
  • My 1st app!  geek
  • Hits close to home geek
  • Prophecy… dilbert
  • Help me, Obi-wan Kenobi boobies
  • The first crew of the Enterprise geek

Power to the beaver!

Show me the beaver!
August 2013
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Jul   Sep »

Quote of the day

"But surely dogs can't talk--" Sacharissa began.
"Oh dear oh dear oh dear," said Gaspode, "Did I *say* I was talking?"
"Well, not in so many words--"
--Sacharissa meets Gaspode the Wonder Dog (Terry Pratchett, The Truth)

Random Posts

  • Nostalgic Pink Floyd surprise
  • Bookbinding projects
  • Jeffers on Easter
  • A brief review of the elections
  • [recipe] Bread-bowl quiche
reading leopard

Tags

bobble the little blue owl boobies brought to you by the fda cats chonk christmas comics computers are evil covid-19 dealing with idiots dilbert dog ducks galleries geek god bless the land of the free holidays house I am Canadian land of cheese and chocolate linked news lolcat london news from the stupid not my dog nsfw pets pictures potd2014 qotd random shit re-member recipes relationship shrill slice of life stress Tao the british way The Peanut things i miss travel video wine work

Archives

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Copyright © 2025 The beaver is a proud and noble animal.

Powered by PressBook Premium theme