bash script to identify the files based on current date and file name pattern .
There are 10 files located in different directory which contains date pattern in it . I need to pick these files one by one and send to remote site .
I thought to list the file naming pattern, location in config file and pick from the script but without any luck . Someone help
sample file name patter and location .
/documents/accounts/abc_yyyy-mm-dd.txt
/documents/namelist/def_yyyy-mm-dd-txt
/documents/newcustomer/ghijkl_yyyy-mm-dd-txt
date=`date +%Y-%m-%d`;
config_file="/scripts/config/abc.cfg";
echo $config_file;
URL="http://localhost:9200/document-$date";
while read var value
do
"$var"= curl -XPUT 'http://localhost:9200/documents-'$date'/document/
done < /path/to/abc.config
to pick these files daily and send it to remote site using curl everyday once all the files are available .