counter=0;
while read line;
do [[ -e "$line" ]] && let counter=counter+1; done < input_file.txt
echo $counter
The above code is reading a file line by line and checking whether the filenames mentioned in the file exist or not .
At present the o/p is value of counter
I want to echo out the name of files not found ( ie present on input file.txt but not in search directory )
eg : if input_file.txt contains files a , b , c
and c is not there in search directory . I want to echo out C not found .