Dears experts
i have UNIX file that contain 4 million lines , i need to extract all lines that have entiries saved in VI file , i have below comand but it takes tooooo long time :
for i in `cat file1.csv`; do cat dump | grep -i $i >> file2.csv; done
where :
file1.csv = VI file that contain entries to be used for search.
file2.csv = output file.
dump = the name of the dump
example for entry in dump :
IP101MURB-I:1-1-4-13,11-409-0687,capCoupling,2016-12-11 19:01:00,50
IP101MURB-I:1-1-4-13,11-409-0687,degraded,2016-12-11 19:01:00,50
IP101MURB-I:1-1-5-27,11-406-7432,capCoupling,2016-12-11 19:01:00,50
example for entry in VI file :
IP101MURB-I:1-1-4-13
example output file contain :
IP101MURB-I:1-1-4-13,11-409-0687,capCoupling,2016-12-11 19:01:00,50
IP101MURB-I:1-1-4-13,11-409-0687,degraded,2016-12-11 19:01:00,50
note that i need all lines that have this entry.
Thanks in advance