I am trying to figure out how to use grep with the patterns in fileA.txt and look for them in fileB.tab. The outcome I want is the number of occurrences of each pattern in fileB.tab.
I have tried:
grep -f FileA.txt FileB.tab | wc -l
But I think that is giving me back all the lines in FileB.tab where a fileA.tab pattern appears.