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.
$ 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
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
See doc/sexpect.html .
See the examples/ dir.