USER=<username>
PASSWD=<pass>

cd <local directory> #Target dir for putting the file
ftp -n <server><<EOF
user $USER $PASSWD
cd <remote directory>
EOF

just use that as a shell script. i am a big fan of command line FTP and use a script simmilar to that to log on to my website