grep -f maximum number of patterns?

前端 未结 5 1242
悲&欢浪女
悲&欢浪女 2020-12-18 04:53

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

5条回答
  •  借酒劲吻你
    2020-12-18 05:36

    You could certainly give sed a try to see whether you get a better result, but it is a lot of work to do either way on a file of any size. You didn't provide any details on your problem, but if you have 10k patterns I would be trying to think about whether there is some way to generalize them into a smaller number of regular expressions.

提交回复
热议问题