I am rather new to using expect and have only written a few scripts using it. I am trying to create a script that will read a file containing a number of hostnames and then for each one: ssh into the box, run a command, scp the output back to a center server.
So far I can make all that happen on one server by using the hostname directly in the script.
I need help incorporating a loop so that I can have it run through every machine listed in my hostnames file. I appreciate any help that you can provide.
Thanks,
Jerrod