Having single or double quotes in a custom variable

Diego Roccia diego.roccia at gmail.com
Mon Sep 6 14:39:51 CEST 2010


You must to escape them

_blah           \"one two three four\" a b c d

Diego


On Mon, Sep 6, 2010 at 1:57 PM, Jelle Smet <nagios at smetj.net> wrote:
> Hi I have a custom host variable define likes this:
>
> _blah           "one two three four" a b c d
>
> I want to use this custom variable in a command to execute like this:
>
> define command{
>
> command_name    check_linux_nrpe_all_disks
>
> command_line    /bin/echo $_HOSTBLAH$ > /tmp/fubar.txt
>
> }
>
> In /tmp/fubar.txt I have this line of text without the quotes:
>
> one two three fou a b c d
>
> How can I keep the quotes?  They can be single or double quotes it doesn't
> matter.
>
> --
> Jelle Smet
> http://www.smetj.net
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting
> any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>



-- 
Diego Roccia
diego.roccia (at) gmail (dot) com

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list