The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:
#!/usr/bin/expect
``
### Variables
Variables are very simple, just use `set {name} {value}`, for example:
set a "apple" set b "banana" set c "cantalope"
Referencing variables is done by simply appending `$` to the name - so `$a` would contain `apple`.
### Arguments
If you want to set a variable by passing in an argument simply use the following:
set user [lindex $argv 0] set password [lindex $argv 1]
Then, when running the script I could supply the varaible content via:
./myscript.tcl myuser mypassword
###