linux - bash: check if multiple files in a directory contain strings from a list -


folks,

i have text file contains multiple lines 1 string per line :

str1 str2 str3 

etc..

i read every line of file , search strings inside multiple files located in different directory.

i not quite sure how proceed.

thanks help.

awk 'nr==fnr{a[$0];next} { (word in a) if ($0 ~ word) print filename, $0 }' fileofwords /wherever/dir/* 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -