Re: returing control to script after ftp, was: [SLUG] scripting ftp login
unindent the ftp SCRIPT . . . SCRIPT I think the closing SCRIPT needs to be at the beginning of the line. Correct! or just unindent the final SCRIPT. SCRIPT tells it to look for SCRIPT. The indented SCRIPT isn't a match. P. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
returing control to script after ftp, was: [SLUG] scripting ftp login
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 -- Voytek -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
Re: returing control to script after ftp, was: [SLUG] scripting ftp login
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
Re: returing control to script after ftp, was: [SLUG] scripting ftp login
quote who=Phil Scarratt Voytek wrote: 2004-10-13 10:18 /usr/local/bin/targzipftp executed on in 1005 sec Interactive mode off. I think the closing SCRIPT needs to be at the beginning of the line. Fil, I think you might be right, I'm getting the response now: ... 2004-10-13 11:33 /usr/local/bin/targzipftp executed on in 927 sec Interactive mode off. finished uploading 2004-10-13 11:40 /usr/local/bin/targzipftp executed on in 1334 sec delete all gzips now # thanks ! -- Voytek -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html