Simple shell script to ftp put a file
#!/bin/bash
filename="/home/paul/myfile.tar.gz"
hostname="ftp.myhost.com"
username="username"
password="password"
ftp -un $hostname <<EOF
quote USER $username
quote PASS $password
binary
put $filename
quit
EOF
But when run, with all the variables filled in, I get this:
ftp: Invalid URL `n'
What am I doing wrong?