greater than


Automation for the rest of us

What is it?

expect-lite is a mature, 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!

Includes a Powerful Debugger with breakpoints, step/skip, copy/paste expect-lite lines right into a running script.

Structured programming via Code Blocks, enables easy to create while loops, foreach loops and conditionals (if statements).

Full IPv6 support, using telnet or ssh over IPv6, and IPv6 addresses in the script.

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 and can be used anywhere a text-based interface needs a bit of automation.

What is it for? 

A simple to use automation tool to do:
  • Functional, System, Regression Testing.
  • White or black box Testing.
  • Automated Router Configuration.
  • Compiler validation.
  • etc.

What New?

Latest version 4.8.1 improvements include:
  • Minor fixes:
    • Unpaired user defined help ';;;' caused crash
    • Variable names can now start with underscore e.g. $_myvar
  • Time functions (added to with mili-second resolution
    • mark_time <varname> - takes system time and places into varname
    • show_time <varname> <formatted_var_name> - converts time value (previously used in mark_time) to human readable format and places in formatted_var_name
    • See examples/mark_time_demo.txt

The main purpose is keep it simple. However, the advanced features allow pretty creative scripting.

The central ideas behind the design are:

  • Just keep it simple and portable - it runs on Linux, Mac OS X, *nix, and Windows(with cygwin).
  • No syntax errors
  • Make the automator's life easier.


Check the IP address of the localhost

>ip -6 addr show

ssh to a remote host

>ssh root@host-021
# issue a command once logged in
While loops using code blocks
[ $i < 5
>echo hello times $i
<times $i
Conditional using code blocks
? $IP == 2001:db8::f00d ? [
>echo future of the internet is here
>echo time to upgrade to IPv6

expect-lite includes over 25 example scripts covering topics such as: if statements, looping, multiple sessions, random number generation, and more.

Where to get it?

The most recent version is always available on SourceForge:

Download expect-lite

31 May 2015

this document for version 4.8.1 and above