Hi guys,
I have many files coming everyday, and I have a list of files that want.
So, I need to check the files coming whether they are in the list or not. If not, I have to remove it.
so in pseudo code would be like this :
find $dest_dir -name "*.csv" > incoming_file_list.txt
for file in `cat incoming_file_list.txt`
do
check whether the file is in the wanted_list.txt
if not
remove it
done
How do I code it ?
Thanks guys
I have many files coming everyday, and I have a list of files that want.
So, I need to check the files coming whether they are in the list or not. If not, I have to remove it.
so in pseudo code would be like this :
find $dest_dir -name "*.csv" > incoming_file_list.txt
for file in `cat incoming_file_list.txt`
do
check whether the file is in the wanted_list.txt
if not
remove it
done
How do I code it ?
Thanks guys