hello all.
I would like to kindly ask you, if you could help me out with one problem.
I have two files -> for ex. file1 and file2
file1 contains only various numbers
file 2 contains multiple columns with various values
What i need is to take every single number, one by one, from file 1 and check if this number occurs in column 5 of file 2 - doesnt matter if it occurs for several times
file 1
49000186672011
49000186682011
49000186692011
49000186702011
49000186712011
49000186722011
49000186732011
49000186742011
49000186762011
file 2
4900017287 2011 WA CO11N 49000186672011
4900017288 2011 WA CO11N 49000186682011
4900017289 2011 WA CO11N 49000186692011
4900017290 2011 WA CO11N 49000186702011
4900017291 2011 WA CO11N 49000186712011
4900017292 2011 WA CO11N 49000186722011
4900017293 2011 WA CO11N 49000186732011
4900017294 2011 WA CO11N 49000186742011
4900017296 2011 WA CO11N 49000186762011
Desired output if matching :
4900017287 2011 WA CO11N 49000186672011 X
4900017288 2011 WA CO11N 49000186682011 X
4900017289 2011 WA CO11N 49000186692011 X
4900017290 2011 WA CO11N 49000186702011 X
4900017291 2011 WA CO11N 49000186712011 X
4900017292 2011 WA CO11N 49000186722011 X
4900017293 2011 WA CO11N 49000186732011 X
4900017294 2011 WA CO11N 49000186742011 X
4900017296 2011 WA CO11N 49000186762011 X
Thank you all in advance for any useful hints.
I tried already some loops, awk searches but without any desired success.