James, Try the ncftpput command. It will probably do what you want, whereas you would need something like expect to get "normal" ftp to work.
man ncftpput Mark Post -----Original Message----- From: James Melin [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 5:10 PM To: [EMAIL PROTECTED] Subject: Backup Script prototype [was behaviour of tar] Here's what I've come up with so far and it seems to work well. Even sends an e-mail to the root user. What I need, and have no good starting point to begin, is an example of FTP being driven by a shell script. Anyone doing that? #! /bin/bash cd /root CURDATE=`date -I` echo 'Curdate = '$CURDATE cd /FileServer RESULTS=`tar -czf $CURDATE.proc.dasd.tar /proc/dasd/* 2>&1 | grep tar` TARERR=`more "$RESULTS" 2>&1 | grep error` if [ "$TARERR" != "" ] then echo 'Error in Tar of tree /proc/dasd' $RESULTS >/root/error/proc.dasd echo '.' >>/root/error/proc.dasd `chmod 700 /root/error/proc.dasd` `sendmail root </root/error/proc.dasd` echo 'There should be mail' else echo 'Tar of /proc/dasd completed without errors # the whole FTP bit goes here fi
