Hi,

I'm trying to load data from files, including dates. After testing the i
can't pass a list to on(), I'm trying to split the date, and feed it to the
on function.
However I can't figure out to make it work. The list doesn't have any
indices apparently.

How should I do it ?

Regards,
Nicolas

Here is a test :
body common control {
    bundlesequence => {"datetest"};
}

bundle agent datetest {
 vars:
    "beginArg" string => "2010,1,13,0,0,0";
    "beginDate" slist => splitstring("${beginArg}", ",", "6");
    "index" slist => getindices("$(beginDate)");

reports:
linux::
    "$(beginDate)[0] $(index)";
}

Result :
R: 2010[0] $(index)
R: 1[0] $(index)
R: 13[0] $(index)
R: 0[0] $(index)
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to