The script below allows user to automate the ftp of files using
unix servers. The script should work in any shell


#Non-interactive FTP session
#Modify the FTPHOST  USERNAME  and PASSWORD as needed
FTPHOST="10.1.1.1"
USERNAME="anonymous"
PASSWORD="df@cd.com"

echo $FTPHOST

(
        for host in $FTPHOST
        do
                echo "
                        open $host
                        user $USERNAME $PASSWORD
                        cd /contrib
                        ls
                        close
                        "
        done
) |  ftp -i -n



1