You can put any legal bash command in a script. The trick is to correctly intercept the messages that come back (eg from ftp), and handle them in a predictable way.
Here is a utility that puports to help with this--I have not tried it.
http://expect.nist.gov/
Specifically for FTP, I am surprised there is not some kind of friendly front -end for linux---or maybe there is...
