grep with special characters

Hi there

I need to grep for a detail from a file. The pattern to search for involves escape sequences in it. This causes for the problem.

grep "P\_SOME\_STRING\_SEARCH" filename

Note, I have line like below in the file and expect it to grep.

 select *
   from my_system_param
 where param_name = 'P\_SOME\_STRING\_SEARCH' escape '\';

Thanks in advance.

grep -F "P\_SOME\_STRING\_SEARCH" filename

Heck!!!

Got the following error.

Usage: grep -hblcnsviw pattern file . . .
grep: illegal option -- F

I have Sun OS 5.8 and KSH.

On Solaris you need to use "/usr/xpg4/bin/grep -F" or "fgrep" instead of "grep -F".