echo "open $IP
user $user $pass
$verbose
$type
put $ifile $ofile
close
quit" |$ftp -n
echo "\n##### End FTP Session #####"
foo=`grep -i "cannot" $log`
if [ "$?" -eq "0" ] ; then
rc=1
status="Destination file does not exist\n"
fi
foo=`grep -i "does not" $log`
if [ "$?" -eq "0" ] ; then
rc=1
status="${status}Source file does not exist\n"
fi
foo=`grep -i "killed" $log`
if [ "$?" -eq "0" ] ; then
rc=1
status="${status}File transfer process has abended\n"
fi
foo=`grep -i "space" $log`
if [ "$?" -eq "0" ] ; then
rc=1
status="${status}Ran out of disk space before completion of copy\n"
fi
if [ "$rc" -eq "0" ] ; then
status="Successful"
fi
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.