I have file A with one column with a list of such rows:
ADAMTS9
AIP
....
I want to use lines in file A for grep lines containing them in file B, and file B looks like this:
chr13 50571142 50592603 ADAMTS9 21461 +
chr19 50180408 50191707 AIP 11299 +
chr19 50180408 50193000 AIP-S1 6532 -
I used:
grep -F -i -w -f A B
and he was able to grep all 3 lines above. However, I want the first two lines to be grep'ed, and the third line with AIP-S1 is not an exact match with AIP ..
Can someone tell me how to fix this command?
Thanks.
olala source
share