执行脚本时出现以下错误。不知道我哪里弄错了。
错误信息:
./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
#------------------------------------------------------------------------------