Voytek wrote:
when ftp upload completes, I get this:
....
now processing bdom.com
tar: Removing leading `/' from member names
finished processing bdom.com
finished tar gzip, now uploading
2004-10-13 10:18 /usr/local/bin/targzipftp executed on in 1005 sec
Interactive mode off.
#
the files all uploaded, but, I'm not returning back to report time/completion
what do I need to return from ftp to complete original script ?
============
#!/bin/sh
HOST='ftp'
USER='123'
PASSWD='543'
starttime=`date +%s`
/gzip stuff snipped/
echo 'finished tar gzip, now uploading'
endtime=`date +%s`
exectime=$(($endtime - $starttime))
now=`date +"%Y-%m-%d %H:%M"`
echo "$now $0 executed on in $exectime sec"
ftp -n $HOST <<SCRIPT
user $USER $PASSWD
cd /home
binary
prompt
mput *.gz
quit
SCRIPT
echo 'finished uploading'
endtime=`date +%s`
exectime=$(($endtime - $starttime))
now=`date +"%Y-%m-%d %H:%M"`
echo "$now $0 executed on in $exectime sec"
#Finished
unindent the
ftp .... <<SCRIPT
.
.
.
SCRIPT
I think the closing SCRIPT needs to be at the beginning of the line.
Fil
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html