<h2 id="introduction">Introduction</h2>
<p>This is the fifteenth episode of the “<a href="https://hackerpublicradio.org/series/0094.html" title="Learning Awk">Learning Awk</a>” series which is being produced by <a href="https://hackerpublicradio.org/correspondents/0300.html" title="b-yeezi">b-yeezi</a> and myself.</p>
<p>This is the second of a pair of episodes looking at <em>redirection</em> in Awk scripts.</p>
<p>In this episode I will spend some time looking at the <code>getline</code> command used for <em>explicit input</em> (as opposed to the usual <em>implicit</em> sort), often with redirection. The <code>getline</code> command is a complex subject which I will cover only relatively briefly. You are directed to the <a href="https://www.gnu.org/software/gawk/manual/gawk.html#Getline" title="Explicit Input with getline"><code>getline</code> section</a> of the GNU Awk User’s Guide for the full details.</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/hpr2824/full_shownotes.html">viewed here</a>.</p>
<h2 id="links">Links</h2>
<ul>
<li><a href="https://www.gnu.org/software/gawk/manual/html_node/index.html"><em>GNU Awk User’s Guide</em></a>
<ul>
<li><a href="https://www.gnu.org/software/gawk/manual/gawk.html#Getline">Explicit Input with <code>getline</code></a></li>
<li><a href="https://www.gnu.org/software/gawk/manual/gawk.html#Plain-Getline">Using <code>getline</code> with No Arguments</a></li>
<li><a href="https://www.gnu.org/software/gawk/manual/gawk.html#Getline_002fCoprocess">Using <code>getline</code> with a <em>coprocess</em></a></li>
<li><a href="https://www.gnu.org/software/gawk/manual/gawk.html#Getline-Notes">Getline notes</a></li>
<li><a href="https://www.gnu.org/software/gawk/manual/gawk.html#Two_002dway-I_002fO">Two-way I/O</a></li>
</ul></li>
</ul>
<ul>
<li>Previous shows in this series on HPR:
<ul>
<li><a href="https://hackerpublicradio.org/eps.php?id=2114">“<em>Gnu Awk - Part 1</em>”</a> - episode 2114</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2129">“<em>Gnu Awk - Part 2</em>”</a> - episode 2129</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2143">“<em>Gnu Awk - Part 3</em>”</a> - episode 2143</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2163">“<em>Gnu Awk - Part 4</em>”</a> - episode 2163</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2184">“<em>Gnu Awk - Part 5</em>”</a> - episode 2184</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2238">“<em>Gnu Awk - Part 6</em>”</a> - episode 2238</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2330">“<em>Gnu Awk - Part 7</em>”</a> - episode 2330</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2438">“<em>Gnu Awk - Part 8</em>”</a> - episode 2438</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2476">“<em>Gnu Awk - Part 9</em>”</a> - episode 2476</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2526">“<em>Gnu Awk - Part 10</em>”</a> - episode 2526</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2554">“<em>Gnu Awk - Part 11</em>”</a> - episode 2554</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2610">“<em>Gnu Awk - Part 12</em>”</a> - episode 2610</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2804">“<em>Gnu Awk - Part 13</em>”</a> - episode 2804</li>
<li><a href="https://hackerpublicradio.org/eps.php?id=2816">“<em>Gnu Awk - Part 14</em>”</a> - episode 2816</li>
</ul></li>
<li>Resources:
<ul>
<li><a href="https://hackerpublicradio.org/eps/hpr2824/full_shownotes.epub">ePub version of these notes</a></li>
<li>Examples: <a href="https://hackerpublicradio.org/eps/hpr2824/awk15_testdata1">awk15_testdata1</a>, <a href="https://hackerpublicradio.org/eps/hpr2824/awk15_ex1.awk">awk15_ex1.awk</a>, <a href="https://hackerpublicradio.org/eps/hpr2824/awk15_ex2.awk">awk15_ex2.awk</a>, <a href="https://hackerpublicradio.org/eps/hpr2824/awk15_testdata2">awk15_testdata2</a>, <a href="https://hackerpublicradio.org/eps/hpr2824/awk15_ex3.awk">awk15_ex3.awk</a>, <a href="https://hackerpublicradio.org/eps/hpr2824/awk15_ex4.awk">awk15_ex4.awk</a>, <a href="https://hackerpublicradio.org/eps/hpr2824/awk15_ex5.awk">awk15_ex5.awk</a>, <a href="https://hackerpublicradio.org/eps/hpr2824/awk15_ex6.awk">awk15_ex6.awk</a>, <a href="https://hackerpublicradio.org/eps/hpr2824/awk15_ex7.awk">awk15_ex7.awk</a></li>
</ul></li>
</ul>
