I have a large file ( A.txt ) of 2 GB containing a list of lines ['Question','Q1','Q2','Q3','Ans1','Format','links',...] .
Now I have another file (1TB) containing the above lines in 2nd position:
Output:
a, Question, b The, quiz, is This, Q1, Answer Here, Ans1, is King1, links, King2 programming,language,drupal, .....
I want to save lines whose second position contains lines in the list stored in the A.txt file. That is, I want to save (save in another file) the following lines:
a, Question, b This, Q1, Answer Here, Ans1, is King1, links, King2
I know how to do this when the length of the list in the file (A.txt) is 100. using "any". But I do not understand how to do this when the length of the list in the file (A.txt) is 2 GB.