empty

Lightweight Expect-like PTY tool for automating interactive shell scripts

brewmacoslinux
Try with needOr install directly
Source

About

Lightweight Expect-like PTY tool for shell scripts

Commands

empty

Examples

Start an interactive session and send commands to it$ empty -f -i /tmp/session empty -s /tmp/session echo 'ls -la' | empty -w /tmp/session
Automate a command sequence in a pseudo-terminal$ empty -f bash empty -s bash echo 'whoami' | empty -w bash echo 'exit' | empty -w bash
Read output from a running PTY session$ empty -f interactive_shell empty -r interactive_shell > output.txt