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) in conjunction with standard UNIX tools like cat, find, grep, sed and such 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, PHP, TCL, 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 target 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
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.
I express deep gratitude to Hewlett Packard AO Russia and personnaly to Denis Karzhavin and Andrew Kuchinsky for C110 (9000/777) workstation
These examples above show the same quick telnet session using empty and various scripting languages.
One of the versions of empty with several modifications by Sergey Zhumatiy (serg[at]parallel.ru) was recently included into Cleo - the task management system for clusters (http://parcon.parallel.ru/cleo.html). Now empty works for clusters at Lomonosov Moscow State University in Russia
Copyright (C), 2005-2009 Mikhail E. Zakharov