[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to schedule for a repeated task?



On 5/7/2010 11:10 PM, hadi motamedi wrote:


    node? Before? I'd really need to look at the script you are using, the
    one produced by the autoexpect session, but you could try either
    sending
    an extra `exit' string or sending a control-C (send \003)
    Take a look here¹ for more ASCII Control Characters.
    When exactly you need to press Control-C? After exiting the remote

Thank you for your reply. Actually, I need to press Ctrl-C after each iteration value of 'i' in the 'for i in' loop. Please find attached the 'script.exp' that my autoexpect has created. I tried for your proposed procedure to send extra 'exit' or 'send \003' in the 'script.exp' but it didn't solve the problem. Please help me to correct it.


Well I see the problem. The autogenerated expect script is waiting for the exact output of ShowStats that it had the first time you ran autoexpect, which I assume will be different every time, not the same.

So, change the part that says:

expect --exact "ShowStats\r ...blah blah lots of stats ... BSC1_1_1-> "

to just:

expect "BSC1_1_1-> "


Reply to: