Tuesday, December 11, 2007

Shell script to ftp file

ftp -n $HOST <quote USER $USER
quote PASS $PASSWD
cd $FTP_PATH
binaryput $BACKUP_PATH/$NOWDATE.tar
quit
END
EXITSTATUS=$?
if [ $EXITSTATUS != "0" ]then
echo "oops! got error, while transferring file to host m/c "
fi

0 comments: