I have two files. One huge one (200.000+ lines) called 'db' and one big one (15.000+ lines) called 'indices'.
What is the quickest way of filtering out the lines in 'db' containing any index (anywhere on the line) from 'indices'
The solution I could think of is
for index in $(cat indices); do grep $index db >> selection done;
but this is taking a long time.
Is there a faster approach in bash, linux?