Expect is a program that "talks" to other interactive programs according to a script. Following the script, Expect knows what can be expected from a program and what the correct response should be. An interpreted language provides branching and high-level control structures to direct the dialogue. In addition, the user can take control and interact directly when desired, afterward returning control to the script.
Send: send string to the current process
Expect: wait until one of the patterns matches the output of a spawned process, a specified time period has passed, or an end-of-file is seen
exp_continue: The command exp_continue allows expect itself to continue executing rather than returning as it normally would
send_user: Like send, except that the output is sent to stdout rather than the current process