Assaf,<br>    Thank you for your help.  Just wanted to add.  Escaping with '\' did not work but it work when I use '$'.  Thanks<br><br><div class="gmail_quote">On Wed, Mar 31, 2010 at 12:32 PM, Assaf Flatto <span dir="ltr"><<a href="mailto:nagios@flatto.net">nagios@flatto.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">shadih rahman wrote:<br>
> Asif,<br>
>    Thanks for your response.  I am attaching the actual plugin in this<br>
> email.  However the actual regular expression line is below.<br>
><br>
> if ($_=~ qr/$xgrep/mo){<br>
>                     $returnstring= "We have found $xgrep in $opfile";<br>
><br>
><br>
> nrpe definition is something like this<br>
><br>
> command[check_filecontent_x64]=/usr/lib64/nagios/plugins/check_filetest<br>
> -n $ARG1$ -G $ARG2$ -c $ARG3$<br>
><br>
><br>
> service definition is something like this<br>
><br>
> check_nrpe -H whatever -c check_filecontent_x64 -a filename ".*foo*" 1<br>
</div>if you  want to pass the quotation marks  to the test you will need to<br>
escape them .<br>
like this [ -a filename \"\.\*foo\*\" 1 ] so nrpe will pass them as part<br>
of the string to the daemon on the target machine.<br>
<br>
Assaf<br>
<font color="#888888"><br>
<br>
<br>
--<br>
</font><div><div></div><div class="h5">Never,Ever Cut A Deal With a Dragon<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Download Intel&#174; Parallel Studio Eval<br>
Try the new software tools for yourself. Speed compiling, find bugs<br>
proactively, and fine-tune applications for parallel performance.<br>
See why Intel Parallel Studio got high marks during beta.<br>
<a href="http://p.sf.net/sfu/intel-sw-dev" target="_blank">http://p.sf.net/sfu/intel-sw-dev</a><br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Cordially,<br>Shadhin Rahman<br>