|
How to -
Scripting
|
|
Expect is a Unix automation and testing tool written by Don Libes. It was written as an extension to Tcl scripting language for interactive application such as telnet, ftp, ssh, passwd, rlogin, fsck etc. It uses Unix pseudo terminals to wrap up subprocesses transparently, allowing the automation of arbitrary applications that are accessed over a terminal. With Tk, interactive applications can be wrapped in X11 GUIs. Expect scripts provide old tools with new power and flexibility. Well, that was Expect script as described in Wikipedia. In other words, Expect can be of great help to system administrators and developers by automating certain monotonous tasks, which have to be done very frequently. Administrators can automate tasks such as read from a file a set of ip addresses and then log into each of them and run some commands. You can have Bash shell script to read each ip address from the file and then call Expect script to login to each system and perform certain routine task. Developers can build executables on host and automatically copy them to a particular location on the target system. Expect can make your life a lot simpler. It can be a real life saver at times. Perl and Python have their own version of Expect.
argaiv1932
|
|
Read more...
|