<h2 id="overview">Overview</h2>
<p>I enjoy writing Bash scripts to solve various problems. In particular I have a number of scripts I use to manage the process of preparing a show for HPR, which I am developing at the moment.</p>
<p>My more complex Bash scripts use a lot of functions to perform the various tasks, and, in the nature of things, some of these functions can be of use in other scripts and are shared between them.</p>
<p>I thought I would share some of these functions with HPR listeners in the hopes that they might be useful. It would also be interesting to receive feedback on these functions and would be great if other Bash users contributed ideas of their own.</p>
<h2 id="full-notes">Full Notes</h2>
<p>Since the notes explaining this subject are long, they have been placed here: <a href="https://hackerpublicradio.org/eps/hpr1757_full_shownotes.html">https://hackerpublicradio.org/eps/hpr1757_full_shownotes.html</a>, and an experimental <em>ePub</em> version is available here: <a href="https://hackerpublicradio.org/eps/hpr1757_full_shownotes.epub">https://hackerpublicradio.org/eps/hpr1757_full_shownotes.epub</a>.</p>
<h2 id="links">Links</h2>
<ol type="1">
<li><em>Bash Support</em> Vim plugin: <a href="https://www.vim.org/scripts/script.php?script_id=365">https://www.vim.org/scripts/script.php?script_id=365</a></li>
<li>HPR episode <em>Bash parameter manipulation</em>: <a href="https://hackerpublicradio.org/eps.php?id=1648">https://hackerpublicradio.org/eps.php?id=1648</a></li>
<li>How to write functions (from <em>The Linux Documentation Project</em>):
<ul>
<li><em>Functions</em>: <a href="https://tldp.org/LDP/abs/html/functions.html">https://tldp.org/LDP/abs/html/functions.html</a></li>
<li><em>Complex Functions and Function Complexities</em>: <a href="https://tldp.org/LDP/abs/html/complexfunct.html">https://tldp.org/LDP/abs/html/complexfunct.html</a></li>
<li><em>Examples of functions in scripts</em>: <a href="https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_11_02.html">https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_11_02.html</a></li>
</ul></li>
<li>Download the <em>pad</em> and <em>yes_no</em> functions: <a href="https://hackerpublicradio.org/eps/hpr1757_functions.sh">https://hackerpublicradio.org/eps/hpr1757_functions.sh</a></li>
</ol>