title: Use awk to compare two files based on one column
body: <p>I have two files which look like this:</p>
  
  <p>file 1:</p>
  
  <pre><code>abc 123
  def 456
  ghi 789
  </code></pre>
  
  <p>file 2:</p>
  
  <pre><code>abc 321
  ghi 987
  </code></pre>
  
  <p>I've heard awk is what I need, but how can I use it to make this desired output?</p>
  
  <pre><code>abc 321
  def 456
  ghi 987
  </code></pre>
  
  <p>You can assume all data has been de-duplicated within the files. So the only thing it needs to do is iterate through the files, and if there's a match between files 1 and 2 on column 1, the output should be the information in file 2.</p>
  
  <p>Thanks in advance!</p>