Sitelet https://web.archive.org/web/20201112040334/https://github.com/clarkwang/sexpect
Skip to content
master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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.

You can’t perform that action at this time.