Grep lines with strings from a file (e.g. lines with 'stringA or 'stringB' or 'stringC')

#with grep
test="stringA stringB stringC"
grep ${test// /\\\|} file.txt
# turning the space into 'or' (\|) in grep
click the source code to copy