On 05/09/11 17:51, [email protected] wrote: > Are you using a new version of Cfengine? I seem to recall having > some issues with the CF_NULL entry in slists not always getting > purged in older (as in, prior to 3.1.5) releases.
I'm using 3.1.5. > So instead of > skipping an empty element in a list, I'd end up having one iteration > with an empty element. In this situation, though, your command might > also be emitting a newline when it doesn't find any results. I'd > check for that. Ah, yes - I think this is highly likely to be the case. > If you can't prune blank lines from the command's > output, you might try using splitting into a temp list and then using > the grep function to pull out only entries which match \w+. Cool - that seems like a plan, if I can't manage to remove the newline character from the output of the find. > I'd also be inclined to use the readfile function instead of putting > cat inside of an execresult, BTW. ;) I tried that, but it broke :-(. It seems that the "files" under /proc and /sys don't look quite enough like real files for cfengine's readfile() to be happy to operate on them. So, "cat" to the rescue ;-) Mike _______________________________________________ Help-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/help-cfengine
