title: Get a difference file by specific patterns in two text files
body: <p>I have 2 text files and I need to export "changes" to a new file. That means that the second file's rows are compared to the first file's rows and if a row isn't found there, then it will append it to the new (third) file. </p>
  
  <p>Contents of the first file are:</p>
  
  <pre>
  ABC 123 q1w2sd
  DEF 321 sdajkn
  GHI 123 jsdnaj
  JKL 456 jsd223
  </pre>
  
  <p>The second file contains:</p>
  
  <pre>
  ABC 123 XXXXXX
  JKL 456 jsd223
  DEF XXX sdajkn
  GHI 123 jsdnaj
  </pre>
  
  <p>Notice that lines which start with ABC and DEF have changed. JKL has just changed it's place.</p>
  
  <p>The output file should contain:
  
  ABC 123 XXXXXX
  DEF XXX sdajkn
  </p>
  
  <p>How to do this using 'awk' or 'sed'?</p>
  
  <p><em>Edit: Also new lines in the second file should be counted as changes..</em></p>