Great Expectations
Expect helps you develop automatic interactive scripts that respond to output from other command-line tools.
|
ximagination, 123RF
Expect helps you develop automatic interactive scripts that respond to output from other command-line tools.
Expect is a natural and intuitive automation scripting language that operates in much the same way humans do when interacting with a system. You type in commands and expect a certain response to your command. When you receive the expected response, you enter another command and so on. Expect works in the same way, except you have to provide the script with commands and expected responses to those commands. Basically, you have to script out the entire two-way "conversation."
You can think of an Expect script as a dialog script written for two actors: a sender and a receiver. One of the more popular activities to automate is an SSH session between two hosts, in which one host is the sender (local host) and the other is the receiver (remote host). Being able to emulate every keystroke and create a true interactive session between two systems via a script is an exciting proposition.
Most Linux distributions include Expect [1] as part of the available and installable software packages. In other words, you won't have to download and install from source code. Use your system's package manager to download and install Expect and any required dependencies or associated packages. In Ubuntu, you would do:
[...]
Pages: 4
Managing multiple computers can often be accomplished just by using SSH, etc. You don't necessarily need to have a big, complex solution like Puppet or Cfengine.
The continued rapid growth of the Internet is placing ever-increasing demands on web servers. Does the venerable Apache HTTP server have what it takes to keep up?
The Ruby tool Shelr transforms the command line into a motion picture, and you can even copy the commands to the clipboard.
With the snazzy little program GNU Parallel, you can make use of the full power of your multicore CPUs through scripts.
Leading ownCloud developers, including the project founder Frank Karlitschek, became dissatisfied with the direction of the project, so they started Nextcloud, a fork of the code and a new company. The goal is to create a better balance among the company, clients, and users. We take a look at how Nextcloud is faring.
© 2025 Linux New Media USA, LLC – Legal Notice