title: syntax error near unexpected token "do"
body: <p>This shell script is throwing an error message :</p>
  
  <blockquote>
    <p>syntax error near unexpected token do</p>
  </blockquote>
  
  <p>Here's my code</p>
  
  <pre><code>#!/bin/bash
  DIRS="/home/delhi_qa/mkv/18000/marketview/log/FIFO_OPTIMISER/LOGS 1"
  DEST="home/delhi_qa/Tests/Ankit/TTLOGSBACKUP"
  DELETE_OLD_ZIP_FILES="no" 
  BASENAME=/usr/bin/basename 
  ZIP=/usr/bin/zip
  for i in $DIRS
  do
      #On running this unexpected token message occurred at this line#
      zipfile="${DEST}/$(${BASENAME} ${d}).zip"
      echo -n "Creating $zipfile..."
      if [ "$DELETE_OLD_ZIP_FILES" == "yes" ]
      then
          [ -f $zipfile ] &amp;&amp; /bin/rm -f $zipfile 
      fi
      ${ZIP} -r $zipfile $d &amp;&gt;/dev/null &amp;&amp; echo "Done!"
  done
  </code></pre>
  
  <p>Can you tell me why?</p>