shell script ftp auto upload
#!/bin/bash
HOST=ftp.example.com
USER=ftpuser
PASSWORD=P@ssw0rd
ftp -inv $HOST (double less than sign) EOF
user $USER $PASSWORD
cd /path/to/file
mput *.html
bye
EOF
# where i = interactive mode / -n = auto login / -v = verbose
# EOF means this script will execute the below lines until it gets another EOF
# you can write any keyword insted EOF but make both starting and ending should not mismatch
# make sure this script and file which u upload is in the same location
by Classmates
linux ftp server