In my Expect script this line is throwing an error:
expect "Address or name of remote host [*]? "
In the log I see this error:
switchnumber1#invalid command name "*"
while executing
"*"
invoked from within
"expect "Address or name of remote host [*]? ""
The remote host ip address in the brackets could change.
Expect uses Tcl. In Tcl,
[...]
in double quotes is the command substitution syntax which is like$(...)
(or`...`
) in Bash.To include a literal
[
char you could write: