I'm new to scripting. I'm trying to write a script to download files from ftp site, the following is the script and the message i get after running the script. no files were downloaded
Thanks advance!
script:
#!/usr/bin/ksh
DAY=`date --date="-1 days" +%y%m%d`
ftp -v -n "ftp.address" << cmd
user "user name" "pass word"
cd /directory
prompt
bin
mget $DAY*
quit
cmd
Message after running the script:
Connected to lnxftp.mer.com.
220 Welcome to the Mer FTP Service.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
331 Please specify the password.
230 Login successful.
250 Directory successfully changed.
Interactive mode off.
200 Switching to Binary mode.
221 Goodbye.