Removing rows based on a different file (ignore my earlier post - there was a mistake).

Sorry I made a mistake in my last post (output is suppose to be the opposite). Here is a revised post.

Hi,

I am not sure if this has already been asked (I tried the search but the search was too broad). Basically I want to remove rows based on another file.

So file1 looks like this (tab seperated):

HHN  3  5  5
HUJ   2  2  1
JJJ     3  1  1
JUN   2  1  3 

I have another file (file2) that looks like this:

HHN 
HUJ 
JUN 

Basically I want to remove the names from file2 in file1

So the output (output file) would look like this:

JJJ     3  1  1

if anyone could help me or assist me with a previous post then it would be great.

Kylle

Add -v option to rdcwayx's grep solution

thank you

:slight_smile:

thank you

:slight_smile: