title: Searching/reading another file from awk based on current file's contents, is it possible?
body: <p>I'm processing a huge file with (GNU) <code>awk</code>, (other available tools are: Linux shell tools, some old (>5.0) version of Perl, but can't install modules).</p>
  
  <p>My problem: if some field1, field2, field3 contain X, Y, Z I must search for a file in another directory which contains field4, and field5 on one line, and insert some data from the found file to the current output.</p>
  
  <p>E.g.:</p>
  
  <p>Actual file line:</p>
  
  <pre><code>f1 f2 f3 f4 f5
  X  Y  Z  A  B
  </code></pre>
  
  <p>Now I need to search for another file (in another directory), which contains e.g.</p>
  
  <pre><code>f1 f2 f3 f4
  A  U  B  W
  </code></pre>
  
  <p>And write to STDOUT <code>$0</code> from the original file, and <code>f2</code> and <code>f3</code> from the found file, then process the next line of the original file.</p>
  
  <p>Is it possible to do it with <code>awk</code>?</p>