I have a file A with one colum with a list of strings like this:
12
123
1234
1234567
I want to use the strings in file A to grep the lines that contains them in file B, and file B looks like this:
1 0/0 ./. 0/1 0/0
12 0/0 0/0 1/1 ./.
1234 1/1 0/1 ./. 0/0
12345 0/0 0/0 1/1 1/1
123456 1/1 1/1 ./. ./.
In this case, I´m waiting an output that match EXACTLY the strings that are in file A, that looks like this:
12 0/0 0/0 1/1 ./.
1234 1/1 0/1 ./. 0/0
I've used grep -wf A B
and it works perfectly, but the problem is that my real files are very heavies and the proces is very costly. Someone have any different idea to get the same results but using other command line?