after <code>clear_number=</code>, a <em>single</em> direct comparison with the keys saved in <code>arr</code> is not possible. This solution loops over all the keys for every input line that matches the <code>direction=2,</code> criteria (breaks the loop if a match is found early).<pre class=language-awk data-lang=awk style=background-color:#f5f5f5;color:#1f1f1f;><code class=language-awk data-lang=awk><span style=color:#5597d6;>FNR</span><span style=color:#72ab00;>==</span><span style=color:#5597d6;>NR</spa