title: Compare alternate lines in two files in unix using grep
body: <p>I am trying to compare two files using unix and return success (if file1 contents match with file2) or return failure if don't match and show the records that don't match</p>
  
  <p>Contents of file1:</p>
  
  <pre><code>columnA1 columnA2
  121     ab354664
  columnB1 columnB2
  143     be000431
  ColumnC1 columnC2
  001     21uy7732
  </code></pre>
  
  <p>Contents of file2:</p>
  
  <pre><code>columnA1 columnA2
  121     ab354664
  columnB1 columnB2
  143     be000431
  columnC1 columnC2
  431     66575wqq
  </code></pre>
  
  <p>I have below code: </p>
  
  <pre><code>if (grep -v "column" $file1) == (grep -v "column" $file2)
  then
      echo -e "match"
  else
      echo -e "dont match"
      grep -B 1 -v "column" $file
  fi    
  </code></pre>
  
  <p>Its throwing the error</p>
  
  <pre><code>syntax error near unexpected token `=='
  </code></pre>
  
  <p>I am not sure if comparison operation can be used for comparing strings in two different files. </p>
  
  <p>Please suggest. </p>