3

I am looking in the content of several files for strings like:

(2E)-3-({5,6-dihydroxy-3-methyl-2-oxo-4-[(1E)-prop-1-en-1-yl]-2,3-dihydro-1-benzofuran

with grep, so I try to do:

grep -n "(2E)-3-({5,6-dihydroxy-3-methyl-2-oxo-4-[(1E)-prop-1-en-1-yl]-2,3-dihydro-1-benzofuran" *.data

but I get errors, probably due to the fact that the string is complex.

Are there additional grep options or another way for me to find this string in the files?

Thanks

tangens
  • 39,095
  • 19
  • 120
  • 139
asdf
  • 2,281
  • 5
  • 28
  • 29

1 Answers1

5

I don't have my man pages to hand, but have you tried grep -F? I think it turns off regexp and treats the pattern as a fixed string. fgrep does the same.

Chowlett
  • 45,935
  • 20
  • 116
  • 150