Consider the following script:
body common control { bundlesequence => { "test" }; } bundle agent test { classes: "found_the_file" expression => fileexists("/bin/bash"); vars: found_the_file:: "myvar" string => execresult("/bin/echo /bin/bash", "noshell"); !found_the_file:: "myvar" string => execresult("/bin/echo /bin/ls", "noshell"); reports: "$(myvar)"; }
This reports:
R: /bin/ls R: /bin/bash
IOW, both found_the_file and !found_the_file are evaluated to true, and reports is executed twice, despite containing only one promise.