I have a couple of big text files and in the file
UNIQS.txt I have a list of strings to
grep from another file. The code I use is
grep -f UNIQS.txt EEP_VSL.uniqs.sam > UNIQ_templates.sam
which does nothing - the file generated is empty. But when I do
grep -F -f UNIQS.txt EEP_VSL.uniqs.sam > UNIQ_templates.sam
it works correctly. This confuses me because I didn't think
grep would interpret the entries in
UNIQS.txt as regexp patterns without quotes and slashes and so on being in the file (which there aren't). Is it the case in general that if you are getting the patterns from a file then it will automatically think that they are regexp patterns?
Edit: In the
UNIQS.txt file, there are newline separated strings of the form
(called template names) and the file
EEP_VSL... tab separated columns, with about 14 columns and the first column is the template name, so basically I want to extract the line corresponding to each template in the file.