Copy Data to multiple machines
for i in 187 135; do echo "--server${i}--"; scp -p -r /dev/mydata myuser@myhost${i}.net:/dev ; done
Execute Scripts in multiple machines
Example 1
for i in 187 135; do echo "--server${i}--"; ssh myuser@myhost${i}.net "chmod 777 /dev/mydata.sh;rm -r /dev/main;" ; done Example 2for i in 187 135; do echo "------de${i}--------"; ssh myuser@myhost${i}.net 'ls -l /dev' ; done
Leave a Reply