{"id":6794,"date":"2015-06-24T01:10:54","date_gmt":"2015-06-24T08:10:54","guid":{"rendered":"http:\/\/blog.networkpresence.co\/?p=6794"},"modified":"2015-06-24T01:10:54","modified_gmt":"2015-06-24T08:10:54","slug":"bashism-convert-the-case-of-a-variable","status":"publish","type":"post","link":"http:\/\/blog.networkpresence.co\/?p=6794","title":{"rendered":"Bashism: Convert the case of a variable"},"content":{"rendered":"<p>Following on with more Bash version 4 Shell coding notes, here&#8217;s a way (as always with Bash, there&#8217;s so many ways to do anything) to ensure a variable is all lowercase characters (or all uppercase):<\/p>\n<p><code>a=Hello<br \/>\necho ${a,,}<br \/>\nhello<br \/>\n<\/code><\/p>\n<p>You can convert to all uppercase characters with <code>echo ${^^}<br \/>\n<\/code><br \/>\nFYI,<br \/>\nRichard.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following on with more Bash version 4 Shell coding notes, here&#8217;s a way (as always with Bash, there&#8217;s so many ways to do anything) to ensure a variable is all lowercase characters (or all uppercase): a=Hello echo ${a,,} hello You &hellip; <a href=\"http:\/\/blog.networkpresence.co\/?p=6794\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,54],"tags":[51,78],"class_list":["post-6794","post","type-post","status-publish","format-standard","hentry","category-network-presence","category-rich","tag-bash","tag-sysadmin"],"_links":{"self":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/6794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6794"}],"version-history":[{"count":1,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/6794\/revisions"}],"predecessor-version":[{"id":6795,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/6794\/revisions\/6795"}],"wp:attachment":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6794"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}