I want to use grep with two variables in a shell script
var = match
cat list.txt | while read word_from_list; do
grep "$word_from_list" "$var" >> words_found.txt
done
But grep expects to get a file as second input:
grep: match: No such file or directory
How can this be solved?