Hello,
I am trying to write an Expect script but I do not know the first lines that are needed in the TCL script.
I tried the following script but it fails in the
'package require Expect'.
What are the correct first lines for Windows?
Thank you.
My script:
#!"c:\Program Files\tcl\bin\wish85.exe"
# \
exec tclsh "$0" ${1+"$@"}
package require Expect
spawn telnet 192.168.1.52
expect "y/n"
send "\r"
expect "login:"
send "user\r"
expect "password:"
send "user\r"
If the package require statement fails, it is likely telling you that the package is not installed. Use ActiveTcl's teacup to acquire it with [teacup install Expect].
Thank you very much. It worked!