Bulk find in UNIX at unknown dir location

Dear All,
I have a file which is having a number my_file.csv

032001031
100509001
203001165

there are many more about 5000.

I have a path in unix

/my_path/my_loc/DEV/RPD10/CPD25/WFM/RK_WFM/OUT/*/

where i will have a file like

CPD25_203001165.pdf
CPD25_100509001.pdf
CPD25_203001165.pdf

I want to match and find out whether all my 5000 files are present in unix dir .

/my_path/my_loc/DEV/RPD10/CPD25/WFM/RK_WFM/OUT/*/

please suggest.

cd /my_path/my_loc/DEV/RPD10/CPD25/WFM/RK_WFM/OUT/
ls -1 *.pdf > PDFFiles
awk -F"[._]" 'NR==FNR{a[$2]++;next}
{ printf a[$1]?$0" File Presnt\n":$0" File not present\n"}' PDFFiles my_file.csv

one simple solution would be to run a loop and then match the resulting files from within the directory. could be something like

for numeric in ` cat my_file.csv`
do
echo "Going for $numeric"
ls -l /my_path/my_loc/DEV/RPD10/CPD25/WFM/RK_WFM/OUT/*/CPD25_"$numeric".pdf
if [[ $? -eq "0" ]]; then 
echo "$numeric Found"
else  
echo "$numeric Not Found"
fi
done

Remember you'll have to fulfill the "*" and "CPD25_" variables accordingly, where they need to differ from this code.

Rgs

no luck..

---------- Post updated at 06:06 AM ---------- Previous update was at 06:06 AM ----------

no luck on this

Hi yadavricky,

Please let us know issue which you have faced.

~pravin~