title: linux compare two variable
body: <p>The script found error but it always goes to Else condition &quot;No Found Error&quot;.  Am I missing how to compare two variables?</p>
  <pre><code>ERROR=&quot;Error:&quot;
  for i in `find /logs -mtime -1`
  do
  CHECK=`cat $i |grep -i &quot;Error&quot;|cut -f 1 -d &quot; &quot;`
  if [ &quot;$CHECK&quot; == $ERROR ]
  then
    echo &quot;Found Error&quot;
  else
   echo &quot;Not Found Error&quot;
  fi
  done
  </code></pre>