If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > loop script

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-09, 12:55
sobnc sobnc is offline
Registered User
 
Join Date: Dec 2009
Posts: 22
Post loop script

Dear Sir
I looking why to write a small script that try to copy a remote file to my local server but i want my script to insist untill the file is copied because somethime the communication line is busy and i should re execute the script. How can i design it in aix environement. Both server have aix OS
thanks
Reply With Quote
  #2 (permalink)  
Old 12-10-09, 17:30
Tyveleyn Tyveleyn is offline
Registered User
 
Join Date: Aug 2006
Location: The Netherlands
Posts: 248
Code:
EXIT=1
while [ $EXIT -ne 0 ];do
    scp ...
    EXIT=$?
done
Regards,
Hans
Reply With Quote
  #3 (permalink)  
Old 12-15-09, 09:33
sobnc sobnc is offline
Registered User
 
Join Date: Dec 2009
Posts: 22
Post next step2

Dear Sir
If my script is build to copy a remote file untill the copy return a file. Please help me to apply the loop statement to this command
cd /home
rcp remote_server:/home/thefile .
exit
Reply With Quote
  #4 (permalink)  
Old 12-24-09, 16:03
sobnc sobnc is offline
Registered User
 
Join Date: Dec 2009
Posts: 22
step 4

Dear Sir
I am still waiting the example of loop script which would permit me to copy a remote file. I received this code before but i am not able to adapt it to a loop instruction.
The copy command is the following rcp remote_server:/home/file_to_copy .

EXIT=1
while [ $EXIT -ne 0 ];do
scp ...
EXIT=$?
done

Thanks
Reply With Quote
  #5 (permalink)  
Old 01-06-10, 06:46
theeiledon theeiledon is offline
Registered User
 
Join Date: Nov 2004
Posts: 60
EXIT=1
while [ $EXIT -ne 0 ];do
rcp remote_server:/home/file_to_copy .
EXIT=$?
done
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On