for ip in `cat fixlist.txt`; do
sudo -u apache ssh root@$ip "`cat iptablesrules.sh`"
done
In the above example we are going to execute the commands within the local file "iptablesrules.sh" on all the machines in "fixlist.txt". This is a great way of performing server maintenance in a clustered or cloud environment.
execute, bash, scripts, remotely, sshfor, ip, fixlist, txt, sudo, apache, ssh, quot, iptablesrules, sh, commands, performing, server, maintenance, clustered,