Using grep but printing a line more than once

view story

http://www.unix.com – Hi, I am using the grep function to grep some lines from a text file. However, a line is grepped only once even if it matches the strings in the first file more than once. How can i change the code so that the line gets printed more than once? Input file 1: Code: 1 o p 1 a b 2 3 c 5 6 7 Input file 2: Code: o a c Desired Output: Code: 1 o p 1 a b 2 3 c Thanks! (HowTos)