###################################################################### # # File editing # # Normal ordering: # - delete # - replace | colum_edit # - insert # ###################################################################### body common control { version => "1.2.3"; bundlesequence => { "testbundle" }; } ######################################################## bundle agent testbundle { files: "/home/mark/tmp/cf3_test" create => "true", edit_line => myedit("second"); } ######################################################## bundle edit_line myedit(parameter) { vars: "edit_variable" string => "private edit variable is $(parameter)"; replace_patterns: # replace shell comments with C comments "#(.*)" replace_with => C_comment, select_region => MySection("New section"); } ######################################## # Bodies ######################################## body replace_with C_comment { replace_value => "/* $(match.1) */"; # backreference 0 occurrences => "all"; # first, last all } ######################################################## body select_region MySection(x) { select_start => "\[$(x)\]"; select_end => "\[.*\]"; }