My script is giving above mentioned error .... is there any workaround

#!/bin/sh
####################################################################
# Createion Date: 21-Jul-2006
# Modification Date:
# Version: 1.0
####################################################################
##############################################################
# Check the parameter
##############################################################
if [ "${#}" -lt 5 -o "${#}" -gt 5 ]
then
  echo "Usage for this script is : <Start Month> <End Month> <DB_Name> <DB_User>
 <DB_Password>"
    exit 1
    fi
    if [ "${#}" -eq 5 ]
    then
    start_month=$1
    end_month=$2
    db_nm=$3
    db_usr=$4
    db_pwd=$5
    fi
    while [ "$start_month" -ne "$end_month" ]
    do
    echo $start_month
    sqlplus -s $db_usr[EMAIL="$db_usr/$db_pwd@t"]/$db_pwd@[/EMAIL]db_nm <<END
    print -p "select * from dual;"
    exit
    END
    $start_month=`eval start_month + 1`
    done

The "END" tag to your so-called "here" document (started by the <<END expression) needs to be at the left hand side. That means it must be placed at the start of line without any whitespace in front of it.

Thnx buddy [:)]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.