Forum: CFEngine Help Subject: Re: Using Variables in insert lines Author: sauer Link to topic: https://cfengine.com/forum/read.php?3,24417,24534#msg-24534
zzamboni Wrote: ------------------------------------------------------- > Yes and no - it would work, but you wouldn't be > able to change values - this method would just > append a new line with the new value, leaving the > old one untouched (unless you emptied the file > before editing each time, and regenerated it from > scratch). And that (empty before editing) would be the easiest way that this could converge. I suppose you could also delete lines matching the common key, using a delete_select to exclude lines matching the "good" lines - and follow that with the above insert lines. But that'd be harder, and require a list consisting of the regexp escaped versions of each candidate line (probably replacing the "1" in my earlier array and using a getvalues call). :) _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine