Need help troubleshooting why my ftp script doesn't work. Previous threads suggested a script like the following to ftp a file that has a filename with yesterday's date.
First, this 11:59pm script creates a file with the appropriate date...
date +%m-%d-20%y > /sasuser/leexjx4/prod/yday.txt
Then the following 12:01am script references yday.txt to ftp the appropriate file...
ftp << EndFTP
open jan
ascii
prompt
get filename_`cat yday.txt`
close
EndFTP
The problem is I get a "cannot open yday.txt" error. Any ideas? I seem to recall while testing, that it did in fact work at some point. Now in a crontab, it results in the error.
First, this 11:59pm script creates a file with the appropriate date...
date +%m-%d-20%y > /sasuser/leexjx4/prod/yday.txt
Then the following 12:01am script references yday.txt to ftp the appropriate file...
ftp << EndFTP
open jan
ascii
prompt
get filename_`cat yday.txt`
close
EndFTP
The problem is I get a "cannot open yday.txt" error. Any ideas? I seem to recall while testing, that it did in fact work at some point. Now in a crontab, it results in the error.