DSH can rely on RSH or SSH to connect to clients and execute commands , obviously nowadays RSH is deprecated so the choice must be SSH.For example a customer requested me to change the timezone format from Posix to Olson for some application compatibility issues .
I wrote the node list in a text file called nodelist (yes i know , i have a lot of fantasy , LOL).
I created a command file called , mhh let’s try to guess…. cmdfile
cp /etc/environment /etc/environment.$(date +%Y-%m-%d_%T)
sed ‘s/^TZ.*$/TZ=NFT-1DFT,M3.5.0,M10.5.0/g’ /etc/environment > /etc/environment.new
grep TZ /etc/environment.new
mv /etc/environment.new /etc/environment
and the shell script dsh_do.sh that do the stuff …reads the cmdfile and gives to it the nodelist as a parameter , one node at a time.
while read node; do dsh -n $node -e ./cmdfile.chgtz; done < nodelist