I'm brand new to Unix and am using CygWIN64 simulator. I have a huge number of text files (tens of thousands) that I need to search for specific strings. I have had success teaching myself to search using a single string, but I cannot figure out after several days of trying how to search for two strings.
My files reside in c:/BF/data/
My single string command is
grep -Rinw c:/BF/data/ -e 'string'
I have tried many example from online and cannot get any command to work with two strings (an AND construction, not an OR construction). If the two strings are present in a line I want to have that line show on the screen. Again, I have been able to do this with one string. The string might have a space in it - if that makes any difference. For example, one string might be 'Miami' and the other 'New York City'.
I have tried different grep
commands, awk
commands and nothing works.
Can someone please point me in the right direction?