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.

  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Facebook (Opens in new window) Facebook
  • Share on Threads (Opens in new window) Threads
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on LinkedIn (Opens in new window) LinkedIn
  • 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

  • Epic Rap Battles of History geek
  • I got my liver computers are evil
  • Hard lesson from software development geek
  • This really is a hard problem geek
  • Someone needs to buy me this t-shirt geek
  • My job title 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

A lie can run round the world before the truth has got its boots on.
--(Terry Pratchett, The Truth)

Random Posts

  • Vintage social networking
  • A sad, horrific milestone
  • How easter eggs are made
  • Yoinked from <lj user="moonlightjoy">
  • The mauve API has streaming with bindings
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 © 2026 The beaver is a proud and noble animal.

Powered by PressBook Premium theme