循环脚本

for h in `cat ok.txt`; do  ssh $h 'for u in `ml all`; do rsync -aP /root/init_ldap_centos.sh $u:/root/ && ssh $u "bash /root/init_ldap_centos.sh"; done'; done

posted @ 2017-03-30 10:38  tengfei520  阅读(100)  评论(0编辑  收藏  举报