cat ip.txt |while read abc;do ssh -n $abc bash <operation.txt;done
while read abc;do ssh -n $abc bash <operation.txt;done <ip.txt
for i in $(cat ip.txt);do ssh $i bash <operation.txt;done
增加ip显示
for i in $(cat ip.txt);do echo -e "-----------------------------------\n$i";ssh $i bash <operation.txt;done
本文转自leonardos51CTO博客,原文链接: http://blog.51cto.com/leomars/1631424,如需转载请自行联系原作者