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

  • Move over D&D, this is B&B comics
  • Ian McKellen and Laura Linney to explore Sherlock’s twilight years geek
  • Hmmmm, Charlize geek
  • DELETED! geek
  • Darmok and Jalad at Tanagra geek
  • Academic Valentines 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 marriage is always made up of two people who are prepared to swear that only the other one snores.
--(Terry Pratchett, The Fifth Elephant)

Random Posts

  • Kitchen helper
  • Trains and tunnels
  • The whore and the grump
  • Looks yummy
  • A PhD in noodles? Kick-ass, Japan!
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