{"id":6961,"date":"2003-05-15T20:36:38","date_gmt":"2003-05-16T00:36:38","guid":{"rendered":"http:\/\/www.ezrasf.com\/wplog\/?p=6961"},"modified":"2013-06-27T21:03:01","modified_gmt":"2013-06-28T01:03:01","slug":"really-small-shell-script","status":"publish","type":"post","link":"https:\/\/www.ezrasf.com\/wplog\/2003\/05\/15\/really-small-shell-script\/","title":{"rendered":"Really Small Shell Script"},"content":{"rendered":"<p>Some elements of my job can be very, very time consuming. Sometimes I slack on things that take large amounts of my time.<\/p>\n<p>For instance, checking for broken links. The first time I did it, I ended up with&#8230; 42 pages of them. About 1\/2 were corrected by the people assigned those portions of the web site. Over the years the total on my server has decreased somewhat.<\/p>\n<p>I believe we are down to about 1069 of them. Still quite a lot. Consider we have 38,696 HTML files. That is only 1\/36? Not too\u00c2\u00a0terribly\u00c2\u00a0bad.<\/p>\n<p>This morning I took a tool I found a while back and added some scripting to the report generator to\u00c2\u00a0make it send an email to the site&#8217;s owner alerting them to the availability of a new report. Also\u00c2\u00a0and made a template of the script which calls the program. I then worked out which elements of the script might change depending on the site and wrote a script to generate a new report. Should I need to just quickly check up on one site, then I can just run that report script.<\/p>\n<p>Since the plan was to always run the broken link\u00c2\u00a0reports once a month, I worked out a master script which calls the others. A cron tab entry now makes this thing kick off on a certain day each month.<\/p>\n<p>So now, I don&#8217;t even have to think about broken links unless to fix ones I may have made. I can also have it scan a site for broken links at will.<\/p>\n<p>Next, I am going to do the same thing with the access log statistical analysis software.<\/p>\n<p>One of my co-workers exclaimed, &#8220;Damn, that script is only 3 lines long!&#8221; :D\u00c2\u00a0Yep, I am replacing myself with really small shell scripts.<\/p>\n<p>My theory has always been works smarter, not harder.<\/p>\n<hr \/>\n<p>Preserved comments:<\/p>\n<ul>\n<li><span style=\"line-height: 12.15625px;\"><span style=\"line-height: 12.15625px;\">5\/16\/2003 3:07 AM by\u00c2\u00a0<a href=\"http:\/\/oenone.xanga.com\/\">OEnone<\/a>:\u00c2\u00a0<\/span><\/span><span style=\"line-height: 1.4;\">&#8220;unless to fix ones I ~~may~~ have made. &#8221;\n<p><\/span>Just thought that *may* needed pointed out.\u00c2\u00a0 *laughs*<\/li>\n<li>5\/16\/2003 4:19 PM by\u00c2\u00a0<a title=\"online now\" href=\"http:\/\/sneezypb.xanga.com\/\"><img data-recalc-dims=\"1\" decoding=\"async\" alt=\"online now\" src=\"https:\/\/i0.wp.com\/s.xanga.com\/images\/onlinenow.png\" data-src=\"http:\/\/s.xanga.com\/images\/onlinenow.png\" \/><\/a>\u00c2\u00a0<a href=\"http:\/\/sneezypb.xanga.com\/\">sneezypb<\/a>:\u00c2\u00a0<span style=\"line-height: 1.4;\">For curiosity sake was I running scans of most sites I maintain in testing this script. Of ten sites I scanned there was 1 broken link.\n<p><\/span>From a page my predecessor made.<\/li>\n<li>5\/19\/2003 8:57 PM by\u00c2\u00a0<a href=\"http:\/\/goddessfourwinds.xanga.com\/\">goddessfourwinds<\/a>:\u00c2\u00a0You kill me, Bear!\u00c2\u00a0 I rarely understand what you are talking about, and, yet, I cannot stand the thought of unsubscribing!!\u00c2\u00a0 I just don&#8217;t have the technical skill or knowledge you do.\u00c2\u00a0 I keep trying to find something in common, uh, other than that one thing we have *huge grin* that we could possible talk about.\u00c2\u00a0 I am still holding out hope!! Peace and love!\u00c2\u00a0 GFW<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Some elements of my job can be very, very time consuming. Sometimes I slack on things that take large amounts of my time. For instance, checking for broken links. The first time I did it, I ended up with&#8230; 42 pages of them. About 1\/2 were corrected by the people assigned those portions of the [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"rawkin sticker","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[2021],"tags":[],"class_list":["post-6961","post","type-post","status-publish","format-standard","hentry","category-from-xanga"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1rUBW-1Oh","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/posts\/6961","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/comments?post=6961"}],"version-history":[{"count":0,"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/posts\/6961\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/media?parent=6961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/categories?post=6961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/tags?post=6961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}