Sometime ago I had posted a Korn script to automate FTP login and upload of file on a Unix or Linux computer. The default shell for most Linux servers is bash. I ran into a situation on a VMware ESX server where the only shell available is bash. I had rewrite my script in the bash shell, here it is.
# Andrew Lin
ftp -vn $hostname <
Here is the link to the Kron version of the script http://www.gamescheat.ca/2009/08/06/how-to-automate-ftp-login-and-file-transfer/.