Following a previous answer I'm trying to list the files on an FTP server that match a pattern, as shown below
event_date=`date +%Y%m%d`
ftp -n XX.XX.XX.XX <<END_SCRIPT
ls *${event_date}* todays_files.dat
quit
END_SCRIPT
Unfortunately this does not work. Is there a way to list these files, apart from listing all files and grep'ing on the client side i.e.
event_date=`date +%Y%m%d`
ftp -n XX.XX.XX.XX <<END_SCRIPT
ls * all_files.dat
quit
END_SCRIPT
grep $event_date all_files.log > todays_files.dat