How do I recursively view a list of files that has one string and specifically doesn\'t have another string? Also, I mean to evaluate the text of the files, not the filenames.>
To match string A and exclude strings B & C being present in the same line I use, and quotes to allow search string to contain a space
grep -r | grep -v -e -e "" | awk -F ':' '{print $1}'
Explanation: grep -r recursively filters all lines matching in output format
filename: line
To exclude (grep -v) from those lines the ones that also contain either -e string B or -e string C. awk is used to print only the first field (the filename) using the colon as fieldseparator -F