Sometimes FTP has to be used to transfer files instead of one of the more secure alternatives, like SCP. Since the FTP client ftp only supports interactive mode, it can be hard to automate when being called from a script.
The script below is used – almost – the same way as a the scp command is. Its first arguments are files to be copied, and the final argument is the FTP address to send them to, similar to the URI used with scp.