title: conditional binary operator expected in shell script
body: <p>I was trying a simple program to compare the string values stored on a log file and was getting an error as below,</p>
  
  <pre><code>#!/bin/bash
  
  check_val1="successful"
  check_val2="completed"
  log="/compile.log"
  
  if [[ grep $check_val1 $log -ne $check_val1 || grep $check_val2 $log -ne $check_val2 ]];
  then
          echo "No Error"
  else
          echo "Error"
  fi
  
  
  Error:
  
  ./simple.sh: line 7: conditional binary operator expected
  ./simple.sh: line 7: syntax error near `$check_val1'
  ./simple.sh: line 7: `if [[ grep $check_val1 $log -ne $check_val1 || grep $check_val2 $log -ne $check_val2 ]];'
  </code></pre>