title: Shell script [Expected end of line, etc. but found unknown token]
body: <p>I'm trying to build a Synergy AutoStart script as per <a href="http://synergy2.sourceforge.net/autostart.html" rel="nofollow noreferrer">this article</a>, the shell is giving me the error </p>
  
  <blockquote>
    <p><strong>Syntax Error</strong>  </p>
    
    <p>Expected end of line, etc. but found
    unknown token</p>
  </blockquote>
  
  <p>Here is the script I'm working on...</p>
  
  <pre><code>#!/bin/sh
  . /etc/rc.common
  
  run=(/usr/local/bin/synergyc -n $(hostname -s) -1 -f 192.168.0.108)
  
  KeepAlive ()
  {
   proc=${1##*/}
  
   while [ -x "$1" ]
   do
    if ! ps axco command | grep -q "^${proc}\$"
    then
     "$@"
    fi
     sleep 3 
   done
  }
  
  StartService ()
  {
   ConsoleMessage "Starting Synergy"
   KeepAlive "${run[@]}" &amp;
  }
  
  StopService ()
  {
   return 0
  }
  
  RestartService ()
  {
   return 0
  }
  
  RunService "$1"
  </code></pre>
  
  <p>And when the error is thrown, the "period" is highlighted on this line <code>. /etc/rc.common</code></p>
  
  <p>Is there something I'm missing here?</p>