Grep is a handy Unix/Linux command for searching for lines in files that containg a particular string. Example:grep "cat" foo
prints all lines of file "foo" that contains "cat".
Do a web search for "grep" to get a full manual.
However, one subtlety is not clear to me from the man page or online manuals.
To print lines that contain either "red" or "blue", typegrep "red\|blue" foo
Notice the backslash ("\") before the infix ("|") symbol. Without this, it does not work.