Terminal

grep / find

powershell
cat INPUT_FILE | find """QUERY_STRING""" > OUTPUT_FILE
bash
cat INPUT_FILE | grep QUERY_STRING > OUTPUT_FILE