Hi all,
how to recursively search for a list of keywords in a given directory??
for example:
suppose i have kept all the keywords in a file called "procnamelist" (in separate line)
and i have to search recursively in a directory called "target/dir"
if i am not doing recursive search then the below command is working.
fgrep -if procnamelist target/dir/*
but when i am using the below command for the recursive search, its throwing error as "bad option -r"
That would have failed even if -[r|R] were supported. A line from procnamelist, which is a pattern to match, is treated as a filename argument to -f. If you put procnamelist where it belongs, after -f, the pipe and while loop serve no purpose.
The sole reason for the existence of this thread is file system traversal. This proposal is an infinite loop that reads one file over and over and over and ...