Forum: CFEngine Help Subject: 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,26695,26710#msg-26710
Thank you for the suggestions. Both of your answers confirm what I felt about an eventual convergence problem. What if I slightly change what I want to do to this : I'd like to replace a specific part of a file (between two specific line for example, and not necessarily at the end) with the content of another file. Would it change anything to the spirit of your answer or should I still use some kind of external processing via commands or a transformer attribute ? To achieve convergence (I don't know if I'm right by saying that, convergence seems quite easy but I've got the feeling that it's far from trivial) I can delete thoses specific lines with delete_lines and a select region attribute and add the content of the other "big" file with insert_lines combined with location and insert_type attribute. The problem with the insert_type is that only "file" value is applicable here, but this one use insert_lines for each line. Back to square one. From what I understand, I would need a new insert_type value which would combine file and preserve_block. Do you agree or there is still convergence problem ? _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine