Originally Posted by spirit receiver
You might want to escape the "." and other special characters that might appear in your filenames. I also assume that your filenames don't contain "|", but then the following should work:
for NAME in $(cat remove.txt)
sed -ie "\|^$NAME\$|d" keep.txt
Thanks a lot! It worked!
You assumed right, the filenames don't contain "|".
But, if you have the time... Could you please explain what the IFS=$'\n' does? The rest I think I can understand.