linux执行远程机器脚本
#!/bin/bash
for i in $(awk '{prinit $0}' ip.txt)
do
#scp a.sh oracle@$i:/tmp #将脚本发送到远程机器
ssh -t oracle@$i "/tmp/oracle.sh" #在远程机器上执行脚本
sleep 2
done
#!/bin/bash
for i in $(awk '{prinit $0}' ip.txt)
do
#scp a.sh oracle@$i:/tmp #将脚本发送到远程机器
ssh -t oracle@$i "/tmp/oracle.sh" #在远程机器上执行脚本
sleep 2
done