[Nagiosplug-devel] [ nagiosplug-Bugs-1985230 ] check_snmp does	not allow " chars in cmdline
    Ton Voon 
    ton.voon at opsera.com
       
    Thu Mar 12 15:55:07 CET 2009
    
    
  
On 12 Mar 2009, at 14:13, Richard Edward Horner wrote:
>> mechanyx: There may be quoting that is required at Nagios. If you  
>> use $ in
>> a command argument, you need to escape it with $$.
>
> I had read this in the documentation somewhere when I was trying to
> get this working and it didn't work although I think what you're
> saying is a tad different than what I read. I believe I escaped the $
> with a $ so I had $$ but it sounds like you're saying escape with $$
> which would result in $$$. Yes? If so, I do not recall trying triple
> dollar sign.
Actually, $$ is fine. $$$ would probably get evaluated to $ (the first  
escaped, the second removed due to an invalid macro).
You then have to consider the shell, so sticking single quotes around  
it will stop the shell from evaluating the ${sometext} as a variable.
This is all before it even reaches the plugin....
Ton
    
    
More information about the Devel
mailing list