ftp to multiple servers

Hi folks. I am writing a ksh ftp script. The problem is, I need to transfer the files to several different servers. Is there a way to close a connection and move on to the next in one script or do I need to write a separate script for each one?

Thanks,
kristy

If you are using the .netrc file to automate your connections, just include "quit" as the last of the commands that you send. You can then continue on and open up a new connection.

Thanks for the suggestion, PxT. I think I solved this another way by using the variable $1 for hostname and then writing another script that provides the hostnames like this:

#!/bin/ksh

cd DIR

./ftpscript host1
./ftpscript host2
./ftpscript host3
./ftpscript host4

-kristy