Linux下ftp命令出错
#! /usr/bin/ksh
#Test FTP
dateVar=`date '+%Y%m%d'`
FILE_PATH=/inc_report/inc/sysadm/clist; export FILE_PATH
OTHER_FILE_NAME=CALL_OTHER_LIST_${dateVar}; export OTHER_FILE_NAME
if [ ! -r $FILE_PATH/$OTHER_FILE_NAME ]; then
echo "${FILE_PATH}/${OTHER_FILE_NAME} Can't copy to 192.168.40.44/u01"
else
echo "begin................."
ftp -n 192.168.40.44<<EOF
user oracle oracle
cd /u01
lcd $FILE_PATH
ascii
put $OTHER_FILE_NAME
bye
EOF
fi;
为何以上shell执行的时候报错??
0403-057 Syntax error at line 13 : `<' is not matched.
------解决方案--------------------除了顶格之外,还要把EOF两边的空格全部删掉。