{"id":28919,"date":"2023-07-29T17:18:45","date_gmt":"2023-07-30T00:18:45","guid":{"rendered":"https:\/\/www.podfeet.com\/blog\/?p=28919"},"modified":"2023-07-29T17:18:45","modified_gmt":"2023-07-30T00:18:45","slug":"ccatp-774","status":"publish","type":"post","link":"https:\/\/www.podfeet.com\/blog\/2023\/07\/ccatp-774\/","title":{"rendered":"CCATP #774 \u2014 Bart Busschots on PBS 153 \u2013 Bash: Functions &#038; Scope"},"content":{"rendered":"<p>In Programming By Stealth, we&#8217;ve come to the end of our journey with Bash. I&#8217;ll be sad to have it complete because as I tell Bart in this episode, I&#8217;ve really enjoyed it.  Next time he will do a final bow-tying episode where he brings everything we learned together in one set of notes as a handy reference guide.<\/p>\n<p>In this episode, he explains how functions work in Bash, and after about the 12th time he repeated it, I understand that functions we create in Bash work just like built-in functions such as <code>ls<\/code> or <code>cat<\/code>.<\/p>\n<p>After walking us through some easy-to-follow scripts to illustrate this and show us the syntax, we go into a harder concept: scope.  We learn that Bash does scope differently from pretty much every other language, and so he teaches us how to avoid spooky action at a distance because of this different way of dealing with scope. Protecting ourselves isn&#8217;t actually hard but it is very important to understand why we need to do this.<\/p>\n<p>You can find Bart&#8217;s fabulous tutorial shownotes at <a href=\"https:\/\/pbs.bartificer.net\/pbs153\">pbs.bartificer.net<\/a>.<\/p>\n<audio class=\"wp-audio-shortcode\" id=\"audio-28919-1\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"https:\/\/media.blubrry.com\/nosillacast\/traffic.libsyn.com\/nosillacast\/CCATP_2023_07_29.mp3?_=1\" \/><a href=\"https:\/\/media.blubrry.com\/nosillacast\/traffic.libsyn.com\/nosillacast\/CCATP_2023_07_29.mp3\">https:\/\/media.blubrry.com\/nosillacast\/traffic.libsyn.com\/nosillacast\/CCATP_2023_07_29.mp3<\/a><\/audio>\n<p><a title=\"mp3 download\" href=\"https:\/\/media.blubrry.com\/nosillacast\/traffic.libsyn.com\/nosillacast\/CCATP_2023_07_29.mp3\" target=\"_blank\" rel=\"noopener noreferrer\">mp3 download<\/a><\/p>\n<p>Read an unedited, auto-generated transcript:   <a href=\"https:\/\/podfeet.com\/transcripts\/CCATP_2023_07_29.html\">CCATP_2023_07_29<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Programming By Stealth, we&#8217;ve come to the end of our journey with Bash. I&#8217;ll be sad to have it complete because as I tell Bart in this episode, I&#8217;ve really enjoyed it. Next time he will do a final bow-tying episode where he brings everything we learned together in one set of notes as [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":18994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"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":[147,172,1,213],"tags":[2008,6003,900,6001,6000,6002,617],"class_list":["post-28919","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-posts","category-ccatp","category-podcasts","category-programming-by-stealth","tag-bash","tag-dynamic-scope","tag-functions","tag-lexical-scope","tag-scope","tag-static-scope","tag-variables"],"jetpack_featured_media_url":"https:\/\/www.podfeet.com\/blog\/wp-content\/uploads\/2019\/08\/PBS_Logo-1-300x300_no_alpha.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/28919","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/comments?post=28919"}],"version-history":[{"count":1,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/28919\/revisions"}],"predecessor-version":[{"id":28920,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/posts\/28919\/revisions\/28920"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/media\/18994"}],"wp:attachment":[{"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/media?parent=28919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/categories?post=28919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.podfeet.com\/blog\/wp-json\/wp\/v2\/tags?post=28919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}