I\'d like to use grep on a text file with -f to match a long list (10,000) of patterns. Turns out that grep doesn\'t like this (who, knew?). After a day, it didn\'t produce
From comments, it appears that the patterns you are matching are fixed strings. If that is the case, you should definitely use -F
. That will increase the speed of the matching considerably. (Using 479,000 strings to match on an input file with 3 lines using -F
takes under 1.5 seconds on a moderately powered machine. Not using -F
, that same machine is not yet finished after several minutes.)