I am trying to read records from file and if string is available in any files then print that file. code:
while read line
do
find ./q/q*.q -type f -exec grep -ls $line {} +
donr< "file_name"
file_name have data like:
india
usa_k
in_va
while execution i am getting grep: illegal option error
Same time I want to store o/p of find in variable. Any help
in loop only i want to concate $line and find o/p and direct in txt file.
code some like:
$line | o/p find >> missing.txt
In i/p file if we have value "INDIA" if this value is aviable in other txt file then i want to print "india is aviable in (filename)" and store this information in txt file. this we need to do for all values..