http://expect-lite.sourceforge.net/
Introduction
What is expect-lite? expect-lite is an quick and easy command line automation tool.
Written in expect, it is designed to directly map an interactive terminal session into an automation script. expect-lite scripts use special character(s) at the beginning of each line to indicate the action. Basic expect-lite scripts can be created by simply cutting and pasting text from a terminal window into a script, and adding '>' '<' characters. No knowledge of expect is required!
Expect-lite is targeted at the verification testing environment, and will produce a Pass/Fail result at the end of the script. However, its use is not limited to this environment.

Features
Expect-lite has many features which make expect-style script writing easy. Such as:
    * Automatic login to remote host (supporting telnet, ssh with password, and ssh with keys)
    * Simplicity using one character for send and expect '>' '<'
      This creates many lines of expect with minimal "code"
    * Regular expression (regex) evaluation in expected results
          o Non-Regex evaluation also available in expected results new in version 3.6.0
    * Static and Dynamic Variables with math functions and pseudo arrays
    * Constants, passed on the command line which override variables in the script
    * Leverages Bash shell
    * Include mechanism to read other script files (sourcing)
    * Embedded Expect - using native expect embedded in an expect-lite script
    * Not Expect - a feature to look for unexpected text/strings
    * Conditional Branching a if/then/else with a c-like syntax
    * Simple looping using conditional branching, a repeat loop can be constructed with infinite loop protection
    * Scripts can be executable with the help of a small embedded bash script
    * User defined prompt allows interaction with a wider range of hosts (routers, switches, etc)
    * Multiple Sessions enabling interaction with a client and a server in one script
    * Instant-Interact empowers on the spot debugging improved in version 3.6.0
Share