Forum: CFEngine Help Subject: Re: readstringlist Author: zzamboni Link to topic: https://cfengine.com/forum/read.php?3,25015,25019#msg-25019
Hi Neil, The reason is that CFEngine does matching on the whole contents of the file, so by using ".*" it is swallowing the rest of the file after the first line. The solution is to be more specific about what characters are allowed in the comment. In particular, this works: "list" slist => readstringlist( "/tmp/testread.cf", "#[^\n]*", "\n", "10", "100000"); Note the use of "[^\n]" instead of "." in the regex. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine