Grep multiple strings from text file

前端 未结 3 487
没有蜡笔的小新
没有蜡笔的小新 2021-01-19 00:39

Okay so I have a textfile containing multiple strings, example of this -

Hello123
Halo123
Gracias
Thank you
...

I want grep to use these st

3条回答
  •  迷失自我
    2021-01-19 01:09

    With GNU grep:

    grep -f file1 file2
    

    -f FILE: Obtain patterns from FILE, one per line.

    Output:

    123-example-Halo123
    321-example-Gracias-com-no
    

提交回复
热议问题