Skip to main content
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k
added 11 characters in body; edited tags; edited title
Source Link
Michael Mrozek
  • 95.7k
  • 40
  • 245
  • 236

Searching strings on files (UNIX)

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

string1
string2
stringn

file1.txt
file2.txt
filen.txt

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

Thanks.

Searching strings on files (UNIX)

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 a (easy) way to do that in bash? I need to know, if a string was found, in which file is it.

Thanks.

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.

Post Migrated Here from stackoverflow.com (revisions)
Source Link
AbraKdabra
AbraKdabra

Searching strings on files (UNIX)

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 a (easy) way to do that in bash? I need to know, if a string was found, in which file is it.

Thanks.