Remove matching files from a list

hi,

i have a cache file with below file list

 more gtda_11.cache
GTDA_Dly_Pmix_GB_6_20130624.20130624070610.psv
GTDA_Dly_Pmix_CH_006_20130624.20130624140018.psv
GTDA_Dly_Pmix_GB_6_20130624.20130624070620.psv
GTDA_Dly_Pmix_BE_6_20130624.20130624070620.psv
GTDA_Dly_Pmix_CA_66_20130624.20130624140018.psv

I have other file ABaC.csv with below file list:

GTDA_Dly_Pmix_CH_006_20130624.20130624140018.psv
GTDA_Dly_Pmix_BE_6_20130624.20130624070620.psv

i want to remove files from gtda_11.cache which are matching with ABaC.csv
i.e : GTDA_Dly_Pmix_CH_006_20130624.20130624140018.psv
GTDA_Dly_Pmix_BE_6_20130624.20130624070620.psv

final out should be:

more gtda_11.cache
GTDA_Dly_Pmix_GB_6_20130624.20130624070610.psv
GTDA_Dly_Pmix_GB_6_20130624.20130624070620.psv
GTDA_Dly_Pmix_CA_66_20130624.20130624140018.psv 

Thanks in advance!!
:slight_smile:

Check

grep -v -f 

But I don't what to create new cache file.....I want to find matching files in it and delete it....may be using some for loops...