Copy A File To Multiple Machines At Once

This is a script I made up to help send files to multiple machines at once. Only one hickup that may have to have the same logon username and password on all machines....which in a business enviroment with a ldap backend this is fairly easy.

Once you have the file saved, make it executable either using graphical tools or from a console
chmod +x the .sh extension tells the graphical enviroment that its a shell script

Run the script from a terminal USERNAME FILETOTRANSFER PATHONREMOTESERVERS HOSTFILE where USERNAME is the username to use on all servers, FILETOTRANSFER is the file on the local machine that you want on the remote hosts, PATHONREMOTESERVERS is the path on the remote servers you want to put the file to, and HOSTFILE is a file containing all the hostnames or ip address of all the hosts you wish to transfer your file to.

For example: bob wallpaper.jpg /tmp/ myhosts.txt and myhosts.txt could look like