empty - run processes and applications under pseudo-terminal (PTY) sessions and replace TCL/Expect with a simple shell-tool |
Common shell (sh, bash, ksh, csh, tcsh) together with standard UNIX tools like cat, grep, sed and etc can bring you all the power of full featured scripting language. In other words, you often do not need to intall and use more powerful languages as Perl or Python, etc. |
But often doesn't mean always, and one of the oldest problems was the use of Command-line interactive programs in UNIX shell-scripts. The goal of this project is to solve the problem and give an opportunity to simplify the management of interactive applications in common sh-scripts. |
empty is an utility that provides an interface to execute and/or interact with processes under pseudo-terminal sessions (PTYs). This tool is definitely useful in programming of shell scripts designed to communicate with interactive programs like telnet, ssh, ftp, etc. In some cases empty can be the simplest replacement for TCL/expect or other similar programming tools because empty:
Nowadays empty was successfully compiled and tested on:
Installation is simple: download, then ungzip and untar the source code: tar zxvf empty-x.y.z.tgz If you have Linux or *BSD just run: make all install clean on any other *NIX try: make `uname -s` all install clean or make `uname -s`-gcc all install clean This will compile and place empty with its manual page under /usr/local tree. Good luck and beware of bugs! empty was written by Mikhail E. Zakharov on the basic idea of pty-4.0 Copyright (c) 1992, Daniel J. Bernstein, but no code was ported from it. Great thanks to:
I express deep gratitude to Hewlett Packard AO Russia and personally to Denis Karzhavin and Andrew Kuchinsky for C110 (9000/777) workstation |
All the examples above show the same quick telnet session using empty and various scripting languages. |
Copyright (C), 2005-2020 Mikhail E. Zakharov