Remove lines in file1 with values from file2

view full story

http://www.unix.com – Hello, I have two data files: file1 Code: 12345 aa bbb cccc 98765 qq www uuuu 76543 pp rrr bbbbb 34567 nn ccc sssss 87654 qq ppp rrrrr file2 Code: 98765 34567 I need to remove the lines from file1 if the first field contains a value that appears in file2: output Code: 12345 aa bbb cccc 76543 pp rrr bib 87654 qq ppp rrrrr Thanks so much! Moderator's Comments: Please use [CODE][/CODE] tags where appropriate, thank you (HowTos)