Skip to main content
3 of 3
edited tags
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k

Searching strings on files

I've got a bunch on strings which I need to find in a couple of files, for example:

string1
string2
stringn

file1.txt
file2.txt
filen.txt

Is there an (easy) way to do that in bash? I need to know, if a string was found, in which file is it.