Extract specific text lines?

前端 未结 10 1278
庸人自扰
庸人自扰 2021-02-03 15:09

I have a large several hudred thousand lines text file. I have to extract 30,000 specific lines that are all in the text file in random spots. This is the program I have to extr

10条回答
  •  悲哀的现实
    2021-02-03 15:35

    What are the criteria that define the 30000 lines you want to extract? The more information you give, the more likely you are to get a useful answer.

    If you want all the lines containing a certain string, or more generally containing any of a given set of strings, or an occurrence of a regular expression, use grep. It's likely to be significantly faster for large data sets.

提交回复
热议问题