linux shell脚本,多个主机同步时间

有很多主机,hostname是lc1~lc19,想在某台机器上执行一个shell,让这些主机都用ntpdate去lc12上同步时间。请问这个脚本应该怎么写循环?
请大神帮忙写下,参考一下。
host文件中已经对主机名做了关联

http://www.1987.name/775.html

 #!/bin/bash
# NTP网络时间校正脚本
# 奔跑

#NTP服务器数组列表
ntpServer=(

[0]=ntp.fudan.edu.cn
[1]=asia.pool.ntp.org
[2]=210.72.145.44
[3]=133.100.11.8
[4]=ntp.sjtu.edu.cn
[5]=time.scau.edu.cn

)

#校验#
serverNum=`echo ${#ntpServer[*]}`
NUM=0
for (( i=0; i<=$serverNum; i++ )); do

    echo -n "正在和NTP服务器${ntpServer[$NUM]}校验中..."
    /usr/sbin/ntpdate ${ntpServer[$NUM]} >> /dev/null 2>&1
    if [ $? -eq 0 ]; then
        echo -e "\e[1;32m\t\t\t\t\t[成功]\e[0m"
        break
    else
        echo -e "\e[1;31m\t\t\t\t\t[失败]\e[0m"
        let NUM++
    fi
    sleep 2

done

#设置BIOS时间和系统时间一致
hwclock --systohc