Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have an expect script that I have written that at the end calls scp to copy a large file from server A to server B.

The issue I have (which is the same using rsync and not scp) is that the expect script is terminating before the file transfer is complete. I know that I can set the timeout in expect but as the file size grows so will the timeout.

Is there anyone that has come across this issue and is there a wait function that I can use in expect?

Many thanks.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

According to http://oreilly.com/catalog/expect/chapter/ch03.html, you can simply set timeout to -1 to disable the timeout mechanism.

share|improve this answer
    
excellent thank you. –  aHunter Nov 21 '10 at 4:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.