I'm using this expect script as an answerfile to a interactive shell script:
#!/usr/bin/expect
spawn ./interactivescriptname
expect "Question 1?"
send "something\r"
expect "Question 2?"
send "yes\r"
expect "Password?"
send "somepassword\r"
interact
above works, but i want to use variables from a inputfile.
my variables files look like this:
var1="something"
var2="yes"
var3="somepassword"
Normally in bash i would use the source command, but this doesn't work in expect.
Any ideas?