{"id":42391,"date":"2020-01-07T09:02:56","date_gmt":"2020-01-07T09:02:56","guid":{"rendered":"https:\/\/www.cryptocabaret.com\/?p=42391"},"modified":"2020-01-07T09:02:56","modified_gmt":"2020-01-07T09:02:56","slug":"5-ways-to-improve-your-bash-scripts","status":"publish","type":"post","link":"https:\/\/www.cryptocabaret.com\/?p=42391","title":{"rendered":"5 ways to improve your Bash scripts"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" typeof=\"foaf:Image\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2020\/01\/rh_003784_02_os.comcareers_os_rh2x.png\" width=\"800\" height=\"449\" alt=\"A person working.\" title=\"A person working.\"><\/p>\n<p>A system admin often writes Bash scripts, some short and some quite lengthy, to accomplish various tasks.<\/p>\n<p>Have you ever looked at an installation script provided by a software vendor? They often add a lot of functions and logic in order to ensure that the installation works properly and doesn&rsquo;t result in damage to the customer&rsquo;s system. Over the years, I&rsquo;ve amassed a collection of various techniques for enhancing my Bash scripts, and I&rsquo;d like to share some of them in hopes they can help others. Here is a collection of small scripts created to illustrate these simple examples.<\/p>\n<p><a href=\"https:\/\/opensource.com\/article\/20\/1\/improve-bash-scripts\">read more<\/a><br \/><ins class=\"adbladeads\" data-cid=\"24663-3514371590\" data-host=\"web.adblade.com\" data-tag-type=\"4\" style=\"display:none\"><\/ins><br \/>\n<script async src=\"http:\/\/web.adblade.com\/js\/ads\/async\/show.js\" type=\"text\/javascript\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A system admin often writes Bash scripts, some short and some quite lengthy, to accomplish various tasks. Have you ever looked at an installation script provided by a software vendor? They often add a lot of functions and logic in order to ensure that the installation works properly and doesn&rsquo;t result in damage to the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":42392,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[307],"tags":[],"class_list":["post-42391","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-open-source"],"_links":{"self":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/42391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=42391"}],"version-history":[{"count":0,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/42391\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/media\/42392"}],"wp:attachment":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=42391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=42391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=42391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}