0

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
2
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by blackeyed
0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.