Is there an easy way to pass a “raw” string to grep?

If you want to search for an exact string,

grep -F '(some|group)\n' ...

-F tells grep to treat the pattern as is, with no interpretation as a regex.

(This is often available as fgrep as well.)

Leave a Comment