All Questions
6
questions
6
votes
1
answer
8k
views
Which characters require escaping in expect strings?
I know that hard brackets [, ] require triple backslash escaping when used inside expect "..." strings, so I use expect "blah blah \\\[herp derp\\\]" to accurately convey these characters to the ...
0
votes
1
answer
2k
views
Does set timeout change each expect statement, or just the final expect eof?
I'm learning to use /usr/bin/expect for the first time, to automate the nightmare that is installing fink from source, as that script has a few dozen prompts, all of which can be answered with the ...
0
votes
1
answer
3k
views
How to handle a condition when an expect script executing another script on a remote host is interrupted?
Im using an expect script to say xyz.exp to login to a remote host and execute another script abc.sh
Now most of the times abc.sh runs fine, but there is a scenario where if a certain condition is ...
1
vote
1
answer
3k
views
file exists not working in expect script
I'm trying to check if a particular line exists in filename on a host. So only if the particular pattern is found from the grep command a dummy.txt will be created. Then I want to check if dummy.txt ...
0
votes
1
answer
996
views
Expect not working using -c arguments
So I have an expect script like this that works:
#!/usr/bin/expect
spawn scp [email protected]:* .
expect {
password: {send "mypassword"; exp_continue}
}
Based on the man page for expect, I think I ...
0
votes
3
answers
16k
views
how to run a local script in remote server using expect and bash script
I want to make a script that will connect to a server and do some CRUD operation on the server and again return to local. I do not want to upload the script to server..
I have made a script that ...