need help for grep -f to run in for loop
basically for each entry in name.txt, I want to grep all the line(s) from A.txt and write out for in separate files
For example 1) name.txt is a list of three following names
America
Europe
Asia
2) A.txt is(tab delimited)
X y Z America
x a b Asia
y b c America
a b c Europe
x y z Europe
a b c America
now taking each entry from name.txt file, search the corresponding line(s) in A.txt and return in three separate output files:
file1: X y Z America
y b c America
a b c America
file2: a b c Europe
x y z Europe
file3: x a b Asia
may be writing it in script and execute with bash?
Thanks in advance!!!