i had written one script
that make connection with remote host
get some file and close the connection ..
it works fine .. but when i put this scrip in between control structure commands like "if , case " then it give me error like" syntax error at line 26 : `<<' unmatched"
please tell me can we use automated ftp script in control structure
my script is
Oms_host=$1
oms_login=$2
oms_pass=$3
oms_installation_location=$4
JAR_FILE1=omsconnectors-src.jar
JAR_FILE2=omsconnectors.jar
JAR_FILE3=oms_api.jar
CSV_FILE1=ExternalCreditCheck.csv
CSV_FILE2=GetAddressById.csv
CSV_FILE3=InternalCreditCheck.csv
CSV_FILE4=GetCustomerInfo.csv
echo " INPUT oms host ${Oms_host} oms login ${oms_login} oms pass ${oms_pass}"
echo " oms_installation_location == ${oms_installation_location}"
echo " INPUT oms host ${Oms_host} oms login ${oms_login} oms pass ${oms_pass}"
check=Y
if [[${check}= Y]]
then
ftp -n ${Oms_host} << EOT
user ${oms_login} ${oms_pass}
cd ${oms_installation_location}/omsserver
get apm.xml
cd ..
cd AMSS_Configuration
get ${JAR_FILE1}
get ${JAR_FILE2}
cd weblogic
get ${JAR_FILE3}
bye
EOT
else
echo "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
fi