Core iTOps Tube

Wednesday, 16 May 2012

Script loops again and again and again and ...

Hi,



Linux newbie here with what I'm guessing is silly questions.



My script below is working in that it correctly copies files from the backup IP (10.0.91.1) back down to the Linux server but trouble is it loops continuously.



It correctly downloads 100 files from the the IP 10.0.91.1 then once complete starts downloading the same files again and again and again....



It's seems to be just the mget command that is looping.


Code:


#!/bin/bash

/home/backupst/grab2

HOST='10.0.91.1'

USER='uuuuuuu'

PASSWD='xxxxxx'

cd /home/backupst/public_html/daily

ftp -n -v  $HOST << EOT

user $USER $PASSWD

prompt

cd cpbackup/daily

mdelete notwanted.tar.gz

mget *

bye

EOT

exit 0


:wall:




No comments:

Post a Comment