Jump to content

A+B: Difference between revisions

35 bytes removed ,  1 year ago
m
CFEngine example tidy
(CFEngine example)
m (CFEngine example tidy)
Line 1,853:
 
<syntaxhighlight lang="cfengine">
$ cat sum.cf
bundle agent main
{
Line 1,872 ⟶ 1,873:
"input[${indices}] is ${with}" with => storejson( "input[${indices}]" );
}
</syntaxhighlight>
 
$ cat input.txt
with input.txt next to sum.cf (above policy file), run cf-agent -KIf ./sum.cf and output will be
2 3
2 2
 
$ cf-agent -KIf ./sum.cf
R: 5
R: 4
</syntaxhighlight>
 
The "R:" prefix is for a report promise and the only way to output to stdout with policy.
4

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.