I need a shell script or perl script that can be execute on a host Ubuntu 10.04 (this host has root keys to all the remote hosts), that reads a text file that contain all the remote hostnames that I want to issue a "shutdown" command.
While the script runs, it should output status that says "I'm shutting down hostxxxx"
Some enhancement that I may want is that I want 2 different text files. The script will do a simple shutdown with all the host in one file. Then the script will issue addtional commands of what to to do before the shutdown (such as shutdown mysql) then shutdonw hosts with machines in the 2nd text file.