<h1 id="extra-ancillary-bash-tips---13">Extra ancillary Bash tips - 13</h1>
<h2 id="making-decisions-in-bash">Making decisions in Bash</h2>
<p>This is the thirteenth episode in the <em>Bash Tips</em> sub-series. It is the fifth and final of a group of shows about making decisions in Bash.</p>
<p>In the last four episodes we saw the types of test Bash provides, and we looked briefly at some of the commands that use these tests. We looked at conditional expressions and all of the operators Bash provides to do this. We concentrated particularly on string comparisons which use <em>glob</em> and <em>extended glob</em> patterns then we devoted an episode to Bash <em>regular expressions</em>.</p>
<p>Now we want to look at the final topic within regular expressions, the use of <em>capture groups</em>.</p>
<h2 id="long-notes">Long notes</h2>
<p>I have provided detailed notes as usual for this episode, and these can be <a href="https://hackerpublicradio.org/eps/hpr2679/full_shownotes.html">viewed here</a>.</p>
<h2 id="links">Links</h2>
<ul>
<li><a href="https://www.gnu.org/software/bash/manual/bash.html">“<em>GNU BASH Reference Manual</em>”</a>
<ul>
<li><a href="https://www.gnu.org/software/bash/manual/bash.html#Conditional-Constructs">“Bash Conditional Constructs”</a></li>
<li><a href="https://www.gnu.org/software/bash/manual/bash.html#Bash-Conditional-Expressions">“Bash Conditional Expressions”</a></li>
<li><a href="https://www.gnu.org/software/bash/manual/bash.html#Bourne-Shell-Builtins">“Bourne Shell Builtins”</a></li>
<li><a href="https://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin">“The <code>set</code> Builtin”</a></li>
<li><a href="https://www.gnu.org/software/bash/manual/bash.html#Pattern-Matching">“Bash Pattern Matching”</a></li>
</ul></li>
<li><p><a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html">“<em>POSIX Shell Command Language</em>”</a> - documentation of all of the POSIX features mentioned in this series.</p></li>
<li><p><a href="https://hackerpublicradio.org/series/0042.html">HPR series: <em>Bash Scripting</em></a></p></li>
<li>Previous episodes under the heading <em>Bash Tips</em>:
<ol>
<li><a href="https://hackerpublicradio.org/eps.php?id=1648">HPR episode 1648 “<em>Bash parameter manipulation</em>”</a></li>
<li><a href="https://hackerpublicradio.org/eps.php?id=1843">HPR episode 1843 “<em>Some Bash tips</em>”</a></li>
<li><a href="https://hackerpublicradio.org/eps.php?id=1884">HPR episode 1884 “<em>Some more Bash tips</em>”</a></li>
<li><a href="https://hackerpublicradio.org/eps.php?id=1903">HPR episode 1903 “<em>Some further Bash tips</em>”</a></li>
<li><a href="https://hackerpublicradio.org/eps.php?id=1951">HPR episode 1951 “<em>Some additional Bash tips</em>”</a></li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2045">HPR episode 2045 “<em>Some other Bash tips</em>”</a></li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2278">HPR episode 2278 “<em>Some supplementary Bash tips</em>”</a></li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2293">HPR episode 2293 “<em>More supplementary Bash tips</em>”</a></li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2639">HPR episode 2639 “<em>Some ancillary Bash tips - 9</em>”</a></li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2649">HPR episode 2649 “<em>More ancillary Bash tips - 10</em>”</a></li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2659">HPR episode 2659 “<em>Further ancillary Bash tips - 11</em>”</a></li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2669">HPR episode 2669 “<em>Additional ancillary Bash tips - 12</em>”</a></li>
</ol></li>
<li>Resources:
<ul>
<li>Examples: <a href="https://hackerpublicradio.org/eps/hpr2679/bash13_ex1.sh">bash13_ex1.sh</a>, <a href="https://hackerpublicradio.org/eps/hpr2679/bash13_ex2.sh">bash13_ex2.sh</a>, <a href="https://hackerpublicradio.org/eps/hpr2679/bash13_ex3.sh">bash13_ex3.sh</a>, <a href="https://hackerpublicradio.org/eps/hpr2679/bash13_ex4.sh">bash13_ex4.sh</a>, <a href="https://hackerpublicradio.org/eps/hpr2679/bash13_ex4.txt">bash13_ex4.txt</a></li>
</ul></li>
</ul>