Forum: CFEngine Help
Subject: insert_lines and file select
Author: tuibelgium
Link to topic: https://cfengine.com/forum/read.php?3,25409,25409#msg-25409
Is it possible to insert lines into a file from another file based on the files
found in a directory.
For example: I have a destination dir: /destination with the following files:
/destination/file1
/destination/file2
/destination/file3
/destination/file4
/destination/file5
In my source dir: /source there are the files:
/source/file2
/source/file3
Now the lines from /source/file2 must be in /destination/file2 and file3 in
file3 etc.
But I don't want to specify file names.
files:
"/destination/${file}"
create => "true",
edit_line => insert_files;
}
bundle edit_line insert_files
{
insert_lines:
"/source/${file}"
insert_type => "file";
${file} must be an slist of the files found in /source
Is there a way to create such a list with cf-engine or do I need to use
external commands?
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine