Double escaping when using $ARGS1$?

Anthony Montibello amontibello at gmail.com
Thu May 21 04:35:31 CEST 2009


Hi,

Not sure if this helps,
I always put my " in the Command definition like such

define command {
       command_name my_plugin_with_args
       command_line /plugins/my_plugin -a "$ARG1$"
}
this seems to be the easiest way to avoid issues,
this seems to work well for at least Check_nt  (the one I use the most)

there has also been several questions on the $ needing $$ posted to the
Nagios User list over the last few years.


Maybe the Docs could use a subsection on escape characters and common usage
instead of a code patch?
How would changing this behavour affect existing configurations?


I think Andreas may have a good opinion/insight on this behaviour

Good Luck,
Tony


On Wed, May 20, 2009 at 9:02 AM, Marc Powell <marc at ena.com> wrote:

>
> On May 19, 2009, at 7:09 PM, Ton Voon wrote:
>
> > Is this correct behaviour? I think this is wrong, or at least
> > inconsistent.
>
> It's documented as being this way to allow you to escape '!' in
> command arguments... I can see that it makes sense because you're
> adding another layer of substitution above the shell and the \-escape
> handling is probably not '!' specific.
>
> http://nagios.sourceforge.net/docs/3_0/macros.html
>
> "Tip: If you need to pass bang (!) characters in your command
> arguments, you can do so by escaping them with a backslash (\). If you
> need to include backslashes in your command arguments, they should
> also be escaped with a backslash. "
>
> --
> Marc
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables
> unlimited royalty-free distribution of the report engine
> for externally facing server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20090520/1af89dad/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list