Deleting Multiple Lines in a File1 using critera found from File 2

view story

http://www.unix.com – Hi Everyone! I would like ask if there's a better way I can delete multiple lines in a file1 by collecting all criteria from file2. file1: a b c d e f file2: a e f The expected value will be: b c d The code below seems to work however if is taking much time when dealing with huge records. cat file2|while read letter do sed -e "/$letter/d" file1 > file1.temp mv file1.temp file1 done Appreciate all your help/input in advance. :) (HowTos)