shell数组

_DistributiongServer_IP="look at the following"
_LocalDir="/home/buildroot/trunk/mjzw-publish/"


#可以采用统一分发,也可以采用自主获取
array=(
"172.16.8.101" 
"172.16.8.102" 
"172.16.8.103" 
"172.16.8.104" 
"172.16.8.105" 
"172.16.8.107")




for i in ${bb[*]} ; do
_DistributiongServer_IP="$i"
rsync -vzrtopg --progress --delete --password-file=/etc/rsyncd.secretes $_LocalDir root@$_DistributiongServer_IP::logs || exit 1
done

你可能感兴趣的:(shell数组)