title: Syntax error near unexpected token fi
body: <pre><code>#export usage='Usage: sh applyPatches4fa_allcases.sh &lt;Parameter Properties File Name&gt;'
  if [ $# -lt 1 ]; then
  echo "The parameters are incorrectly passed"
  echo $usage
  echo $usageexample
  exit 1
  fi
  if test -f $1  
  then
   echo $1 'file exist'
  else
  echo $1 'file does not exist'
  exit 1
  fi
  logfile=applyPatches4fa.log;
  if [ -f "$logfile" ]; then
   rm -f $logfile;
  else
  touch -a $logfile;
  fi
  </code></pre>
  
  <p>The above code is in my applyPathes.sh file and below i ran the command on console
  sh applyPatches.sh ok.sql</p>
  
  <p>I got below output</p>
  
  <pre><code>ok.sql file exist
  line 20: syntex error near unexpected token fi
  </code></pre>