problem with grep command
Hi guys,
I have the following problem when using the grep command:
I want to select some entries from a file (source_file.cat),
using as a reference a one-column file (ref_file.cat)
with entries (I call them "ID") common in both files, such as
75963
71903
-20486
the grep command will work fine for the first two entries, but it will complain
for the third one as grep does not like the "-" sign. It will only work if I convert
the - sign to '\-' in my do loop. Is there a smart way of doing that?
Thanks in advance,
Thodo
|