Forum: Cfengine Help
Subject: built-in function countlinesmatching - syntax error
Author: hharun
Link to topic: https://cfengine.com/forum/read.php?3,20771,20771#msg-20771
Hello,
I am trying to use countlinesmatching built-in function and getting this errror:
cf3 > Parsing file /var/lib/cfengine/inputs/test.cf
cf3:/var/lib/cfengine/inputs/test.cf:15,68: Unknown built-in function
countlinesmatching(), near token ')'
cf3 Initiate variable convergence...
cf3 No such FnCall "countlinesmatching()" in promise @
/var/lib/cfengine/inputs/test.cf near line 15
cf3 Unable to converge test.zero value (possibly empty or infinite regression)
cf3 Promise (version not specified) belongs to bundle 'test' in file
'/var/lib/cfengine/inputs/test.cf' near line 15
cf3 Initiate variable convergence...
cf3 Variable zero has no promised value
cf3 Rule from /var/lib/cfengine/inputs/test.cf at/before line 15
cf3 # Knowledge map reporting feature is only available in version Nova and
above
:
Segmentation fault
My test.cf looks like this:
body common control
{
bundlesequence => { "test" };
}
bundle agent test
{
vars:
"zero_regex" string => "impossible line";
"zero" int => countlinesmatching("$(zero_regex)", "/etc/passwd");
}
I'm using cfengine-3.0.2-3.1.x86_64 rpm that comes with openSuSE 11.3.
Thanks.
...Hazita
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine