Forum: CFEngine Help
Subject: Re: CFEngine Help: Re: Append the content of file to another one 
without checking for duplicate lines
Author: jbdenis
Link to topic: https://cfengine.com/forum/read.php?3,26711,26718#msg-26718

Yes, it is working. The code that initiated this post just does that. The 
problems are :

- no duplicates in the file
- since the file to insert can be "big" (1 or 2 MB), this lead to exponential 
execution time due the the use of insert_lines for each line

Those are two blocking problems for me at the moment. I'm sure I can find a 
workaround thanks to the suggestions here (via tranformer attribute or commands 
promise) but I would have like a solution without external help =)

The "file_preserve_block" attribute for "insert_type" looks like a solution to 
me. But this is far from trivial to evaluate the implication on the 
convergence. If one the developpers comes by, I would be very happy to hear his 
advice !

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to