Nested macros?


#1

I am trying to establish nested macros to define a message format, like so:

define host{
        _FORMAT                         $HOSTADDRESS$: $HOSTSTATE$ \n$HOSTOUTPUT$\n$LONGHOSTOUTPUT$\n$NOTIFICATIONCOMMENT$
        }

to use with a couple commands, like this:

define command{
                --argument "$_HOSTFORMAT$"
}

The output is literally
HOSTADDRESS SERVICEDESC: SERVICESTATE
SERVICEOUTPUT
LONGSERVICEOUTPUT
NOTIFICATIONCOMMENT
instead of the values for these variables.

Suggestions?


#2

try double $ signs. a shot in the dark but worth a try.