isvariable
Prototype: isvariable(var)
Return type: class
Description: Returns whether a variable named var
is defined.
The variable need only exist. This says nothing about its value. Use
regcmp
to check variable values.
Arguments:
var
: Variable identifier, in the range[a-zA-Z0-9_$(){}\[\].:]+
Example:
bundle agent example
{
vars:
"bla" string => "xyz..";
classes:
"exists" expression => isvariable("bla");
reports:
exists::
"Variable exists: \"$(bla)\"..";
}