Problem using grep to search for multiple strings listed in a file
Hi - I'm having a problem using grep to extract lines from a data file that contain one of several different strings. I am trying to load the strings from a file - hence, the code I'm using is:
grep -f file.containing.strings data.file
When I run this, grep doesn't return any output.
The strings are listed in my file one per line, and I have tried listing the strings in this file both with and without single quotation marks. I have also checked that (at least some of) the strings I'm searching for are definitely in the data file, using the regular:
grep 'string' data.file
Any ideas what I'm doing wrong?
Thanks!
|