cf3: readstringlist with extra read
Matt Richards <[email protected]> Fri, 8 May 2009 10:45:08 -0400
| Newsgroups | gmane.comp.sysutils.cfengine.bugs |
|---|---|
| Message-ID | <[email protected]> |
Greetings,
I am getting this bug were readstringlist will have an extra blank
line at the end. I can see why it would do this, but I don't believe
it should. The example below is reading a file call list:
# cat ../list
a
b
c
#
body common control {
bundlesequence => { "test" };
}
bundle agent test {
vars:
"list" slist => {
readstringlist("$(sys.workdir)/list","#.*","[\n]",1000,10000) };
reports:
Yr2009::
"list *$(list)*";
}
cf3 .........................................................
cf3 Promise by: list *a*
cf3 .........................................................
cf3
cf3 R: list *a*
cf3
cf3 .........................................................
cf3 Promise by: list *b*
cf3 .........................................................
cf3
cf3 R: list *b*
cf3
cf3 .........................................................
cf3 Promise by: list *c*
cf3 .........................................................
cf3
cf3 R: list *c*
cf3
cf3 .........................................................
cf3 Promise by: list **
cf3 .........................................................
cf3
cf3 R: list ** <======= should this be here?
cf3