スクリプトの実行中に次のエラーが発生します。どこが間違っているのかわからない。
エラーメッセージ:
./ftp_send_script.sh: line 40: syntax error: unexpected end of file
これがスクリプトです
#!/usr/bin/bash
#Define Variables
#------------------------------------------------------------------------------
HOST=qftpserver
USER=ftpuser
PASS=password
#------------------------------------------------------------------------------
#FTP files
#------------------------------------------------------------------------------
for FILE in `ls *.txt`
do
ftp -n -p << EOT
open $HOST
user $USER $PASS
prompt n
type binary
mput ${FILE}
quit
EOT
echo ${FILE}
done
#------------------------------------------------------------------------------