title: Parsing result of Diff in Shell Script
body: <p>I want to compare two files and see if they are the same or not in my shell script, my way is:</p>
  
  <pre><code>diff_output=`diff ${dest_file} ${source_file}`
  
  if [ some_other_condition -o ${diff_output} -o some_other_condition2 ]
  then
  ....
  fi
  </code></pre>
  
  <p>Basically, if they are the same ${diff_output} should contain nothing and the above test would evaluate to true.</p>
  
  <p>But when I run my script, it says<br>
  [: too many arguments</p>
  
  <p>On the if [....] line.</p>
  
  <p>Any ideas?</p>