title: bash file gives error "syntax error near unexpected token `fi'"
body: <p>When trying to execute my script below, I get this error:</p>
  
  <pre><code>syntax error near unexpected token `fi'
  </code></pre>
  
  <p>file:Ccamcheck.sh is in usr/script</p>
  
  <p>My script:</p>
  
  <pre><code>#!/bin/sh
  if ps x |grep -v grep |grep -c CCcam &gt;/dev/null
  then
  echo "cccam... ok"
  echo &amp;&amp; date &gt;&gt; /var/log/CCcam.ok
  else
  echo "cccam... restarting"
  echo &amp;&amp; date &gt;&gt; /var/log/CCcam.check
  CCcam
  fi
  </code></pre>
  
  <p>Does anyone know why I am receiving this error?</p>