Script Help

I am in need of a script that uses a flat file of ip addresses (200 clients) to update client software. It could telnet or use some other command that is ip friendly and would login using a port with login info and would send a link where the probe grabs the software update.

Does anybody have any scripts that would be similar they could pass on that I could use or adapt?

my clients are probes that throughout the country and the software I am speaking of is the firmware they run. So I am looking to update the firmware on my 200 probes. I am using a version of Unix called Open Step which I have been told is similar to Mac OS X on the server that will be running this C-Shell Script.

This is my base script. It goes out to the clients, but it doesn't complete the download before going to the next client. Can anybody suggest something I can change to make this script stop to do the update and then move on to the next client? Thanks!

# this script works to update Firmware
#
USERNAME=loginname
PDW=password
NEW=http://xx.xx.xx.xx/newsoftwarename.txt
date 2>&1
sleep 1
cat file1 | while read H
do
(
sleep 1
echo $USERNAME
sleep 1
echo $PDW
sleep 2
echo $NEW
sleep 3
) | telnet $H 24
done

I know I can add a wait statement but then if there is a network hicup or something that takes a download longer it may move on to the next client without completing. I am hoping I can add some kind of logic or character to make it stop until the process has completed. Thanks for everyone's help and time.