{"id":7683,"date":"2013-08-14T13:44:41","date_gmt":"2013-08-14T13:44:41","guid":{"rendered":"http:\/\/www.flubu.com\/blog\/?p=7683"},"modified":"2013-08-14T13:54:47","modified_gmt":"2013-08-14T13:54:47","slug":"i-love-unix-one-liners","status":"publish","type":"post","link":"https:\/\/www.flubu.com\/blog\/2013\/08\/14\/i-love-unix-one-liners\/","title":{"rendered":"I love unix one-liners"},"content":{"rendered":"<p>The software that I use to generate the photo albums has started being annoying and inserts javascript that generates a &#8220;Built with XXX, Click here to buy a license&#8221; soft-popup in the album pages. It&#8217;s annoying as feck. I set about to do something geeky about it and came up with this:<\/p>\n<p><code>find . -name \"*.html\" -execdir sed -i -n '1h;1!H;${;g;s\/&lt;script type.*CDATA*&lt;\/script&gt;\/\/g;p;}' {} +<\/code><\/p>\n<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.<\/p>\n<p>I love linux.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The software that I use to generate the photo albums has started being annoying and inserts javascript that generates a &#8220;Built with XXX, Click here to buy a license&#8221; soft-popup in the album pages. It&#8217;s annoying as feck. I set about to do something geeky about it and came up with this: find . -name&#8230;<\/p>\n<p class=\"more-link-wrap\"><a href=\"https:\/\/www.flubu.com\/blog\/2013\/08\/14\/i-love-unix-one-liners\/\" class=\"more-link\">Read More<span class=\"screen-reader-text\"> &ldquo;I love unix one-liners&rdquo;<\/span> &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[17],"class_list":["post-7683","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-geek"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3u9vK-1ZV","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flubu.com\/blog\/wp-json\/wp\/v2\/posts\/7683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flubu.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flubu.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flubu.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flubu.com\/blog\/wp-json\/wp\/v2\/comments?post=7683"}],"version-history":[{"count":2,"href":"https:\/\/www.flubu.com\/blog\/wp-json\/wp\/v2\/posts\/7683\/revisions"}],"predecessor-version":[{"id":7685,"href":"https:\/\/www.flubu.com\/blog\/wp-json\/wp\/v2\/posts\/7683\/revisions\/7685"}],"wp:attachment":[{"href":"https:\/\/www.flubu.com\/blog\/wp-json\/wp\/v2\/media?parent=7683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flubu.com\/blog\/wp-json\/wp\/v2\/categories?post=7683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flubu.com\/blog\/wp-json\/wp\/v2\/tags?post=7683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}