Forum: CFEngine Help
Subject: readstringlist
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,25015,25015#msg-25015
I would like to read a file into a slist so that each line is a list element.
# This is a comment
body common control {
bundlesequence => {
"main",
};
}
bundle agent main {
methods:
"any" usebundle => test;
}
bundle agent test {
vars:
"list" slist => readstringlist( "/home/n463345/tmp/rsl.cf",
"#.*", "\n", "10", "100000");
reports:
cfengine::
"list: ${list}";
}
This works only if no comment strings exist. If comments are found nothing is
read into memory. Sounds like a bug. Any workarounds?
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine