title: getting syntax error at line 34 : `<<' unmatched in ksh script
body: <p>I have a shell script, when I execute it, I get the error </p>
  
  <pre><code>syntax error at line 34 : `&lt;&lt;' unmatched in ksh script
  
  column_name=`sqlplus -s $BASE_DB_CONN&lt;&lt;!!
      WHENEVER SQLERROR exit ROLLBACK
      set SQLPROMPT ''
      set heading off
      set pagesize 1000
      set linesize 5000
      set feedback off
      set define on
      set verify off
      @smm9_stream_map.sql $STREAM_NAME $FIELD_NAME"
      exit
      !!`;
  </code></pre>
  
  <p>To my surprise the same thing works in the while loop  altered script as below </p>
  
  <pre><code>while [ $a -lt ${NO_LOOP} ]
  do
  column_name=`sqlplus -s $BASE_DB_CONN&lt;&lt;!!
      WHENEVER SQLERROR exit ROLLBACK
      set SQLPROMPT ''
      set heading off
      set pagesize 1000
      set linesize 5000
      set feedback off
      set define on
      set verify off
      @smm9_stream_map.sql $STREAM_NAME $FIELD_NAME"
      exit
      !!`;
  a=`expr $a + 1`
  done
  </code></pre>
  
  <p>Why does the second script work but not the first one?</p>