Skip to content

idorax/sexpect

 
 

Repository files navigation

What's sexpect

sexpect is another implementation of Expect.

Unlike Expect (Tcl), Expect.pm (Perl), Pexpect (Python) or other similar Expect implementations, sexpect is not bound to any specific programming languages so it can be used with Shells (Bash, Ksh, Zsh, ...) and any other languages which support running external commands. Users who write shell scripts would love this because they don't have to learn other languages just to use the Expect feature.

Another interesting sexpect feature is that the spawned child process is running in background. You can attach to and detach from it as needed.

How to build

The Make Way

$ make
$ cp ./sexpect /usr/bin/
$ /usr/bin/sexpect -help

The CMake Way

$ mkdir build; cd build; cmake ..; make
$ cp ./sexpect /usr/bin/
$ /usr/bin/sexpect -help

Supported platforms

Tested on:

  • OpenWRT 15.05.1, ramips/mt7620 (on Newifi Mini, or Lenovo Y1 v1)
  • Debian Linux 9 (Stretch)
  • macOS 10.13 (High Sierra)
  • FreeBSD 11.1
  • Cygwin on Windows 10

Manual

See doc/sexpect.html .

Examples

See the examples/ dir.

About

Simple yet Super Expect

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 89.2%
  • Shell 9.2%
  • CMake 1.5%
  • Makefile 0.1%