Forum: CFEngine Help
Subject: Re: How-to insert multi line string at the top of file ?
Author: juriskrumins
Link to topic: https://cfengine.com/forum/read.php?3,27226,27228#msg-27228
But you've left the next paragraph:
What was probably intended was to add multiple ordered lines after the marker,
which should be a single correlated promise.
and following code:
bundle edit_line x
{
insert_lines:
"line one$(const.n)line two" location => myloc;
}
So when I redefine multi line string using $(const.n) as a line separator and
use
body location after_line1(linenum)
{
before_after => "after";
select_line_number => "$(linenum)";
}
then flines gets appended in the correct order but at the end of the file, not
at the begging.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine