Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clarkwang/sexpect
Expect for Shells
https://github.com/clarkwang/sexpect
automation bash expect pty shell tty
Last synced: 8 days ago
JSON representation
Expect for Shells
- Host: GitHub
- URL: https://github.com/clarkwang/sexpect
- Owner: clarkwang
- License: gpl-3.0
- Created: 2018-04-20T14:20:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-21T10:51:49.000Z (about 1 year ago)
- Last Synced: 2024-04-23T23:37:11.574Z (7 months ago)
- Topics: automation, bash, expect, pty, shell, tty
- Language: C
- Homepage:
- Size: 208 KB
- Stars: 119
- Watchers: 6
- Forks: 15
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# What's `sexpect`
`sexpect` is another implementation of [`Expect`][expect] which is
specifically designed for *Shell* scripts (sh, bash, ksh, zsh, ...).`sexpect` is designed in the client/server model.
`sexpect spawn PROGRAM [option]..` starts the _server_ (running as a daemon)
and runs the specified _PROGRAM_ in background.
Other `sexpect` sub-commands (`send`, `expect`, `wait`, ...) communicate to the
server as _client_ commands.# How to build
Sexpect uses [CMake](https://cmake.org/) for building.
$ cd /path/to/cloned/sexpect/
$ mkdir build
$ cd build
$ cmake ..
$ make
$ make install
By default it will install to `/usr/local/` and `sexpect` will be installed to `/usr/local/bin/`. To change the installation location, run `cmake` like this:$ cmake -D CMAKE_INSTALL_PREFIX=/opt/sexpect ..
## Supported platforms
Tested on:
* OpenWRT 15.05.1, ramips/mt7620 (on [Newifi Mini, or Lenovo Y1 v1][newifi])
* Debian Linux 9 (Stretch)
* macOS 10.13 (High Sierra)
* FreeBSD 11.1
* Cygwin on Windows 10[newifi]: https://openwrt.org/toh/lenovo/lenovo_y1_v1
# ManualSee [doc/sexpect.adoc](doc/sexpect.adoc).
# ExamplesSee the [examples/](examples/) dir.
[expect]: https://www.nist.gov/services-resources/software/expect
[expect.pm]: http://search.cpan.org/perldoc?Expect
[pexpect]: https://pexpect.readthedocs.io/