need a script that does a simple task on multiple unix servers.

hi guys,
i need a script that does a simple task on multiple aix servers.
if possible with both telnet and ssh.
the simple task i wanna do is connect to a server and run "ifconfig -a" and get the output. nextweek i need to do similar jobs on like 50 servers... :frowning:
can anybody help me with making this script plz?

hi curtis,

there are many past threads on unix.com regarding a nedd similar to yours;
you may have a look at the following past threads for the structure of some expect script that may be useful for your task:
Expect script - going in loops can't stop
Passing password for ssh in Script

to send the output of a command from expect to a log file, have also a look at:
expect log file - The Tcl programming language

see ya
fra

1 Like

thnx a lot fra!