#/bin/bash # Run this script to run the $command in all nodes, including master or localhost command='hostname' /share/bin/pdsh_sshreachable > /dev/null hosts=$(cat /share/tmp/ssh-reachable.dat) pdsh -R ssh -w ^/share/tmp/ssh-reachable.dat $command