Using .netrc for automated ftp

Sometimes there comes a need to actually automatically ftp things. But usually when you automatically ftp things, you have to enter in a password. The way around this is to use the .netrc file.
The .netrc file stores the machine name, the login, and the password for the ftp. This allows you to set up ftp actions without having to mess with the interactive parts and do everything else directly from a shell script.
Not exactly something that you’d want to always do for everything, but now and again behind a firewalled network, isn’t a bad idea for automated backups. Even if your passwords change constantly through a time seeded hardware device, you can set it up so that everything is still running from a shell script and the only thing you would have to do is type in the password. Beats doing things manually, eh?