title: How to compare first column of two files and print the difference of second and third column?
body: <p>I want to compare first column of two different files and if there is a match, put the difference of second and third column of both files into a new file with first column as the matched entry.</p>
  
  <p><code>Output File = Matched,Difference of c2 and c3 of file1,Difference of c2 and c3 of file 2</code></p>
  
  <p>Example:</p>
  
  <p>File 1</p>
  
  <pre><code>12,1,3 
  13,2,4 
  14,5,7
  </code></pre>
  
  <p>File 2</p>
  
  <pre><code>12,4,5
  13,4,7
  15,3,9
  </code></pre>
  
  <p>Desired Output File</p>
  
  <pre><code>12 -2 -1
  13 -2 -3
  </code></pre>
  
  <p>Please tell me how may I do this. <strong>File length is varying. File1 is of length 100 and File2 is of length 20</strong></p>