I need to search for lines which contain some word but do not contain a second word.
For example, find lines that contain the word "This" but not the word "red"
so that for a file containing these lines
This is a blue coat
This is a red coat
This is a purple coat
That is a coat
The search would locate the first and third lines only.
Thanks for any advice!