This works if it's not in a function. I pulled it into one and I get syntax error, no mathcing '<'. I have to call it several times and need it to be a function. Any ideas?
function FTP_Engine_File {
ftp -inv $\{FTP_SERVER\} << EOF_FTP >> $\{FTP_LOG\}
user $\{FTP_USER\} $\{FTP_PSWD\}
cd $\{FTP_DIR1\}
cd $\{FTP_dir2\}
bin
mget $\{FTP_FILE\}
quit
EOF_FTP
mv engine.tar.Z $HOME/"$CURRENT\_VERSION"/"$test_type/engine.tar.Z
It's all in the first column and now getting an unmatched '{'. I've been looking for an online resource with examples of functions without much luck. I'm new at this so sorry if this is an elementary issue.
function FTP_Engine_File {
ftp -inv ${FTP_SERVER} << EOF_FTP >> ${FTP_LOG}
user ${FTP_USER} ${FTP_PSWD}
cd ${FTP_DIR1}
cd ${FTP_dir2}
bin
mget ${FTP_FILE}
quit
EOF_FTP
mv engine.tar.Z $HOME/"$CURRENT_VERSION"/"$test_type/engine.tar.Z
}