###################################################################### # # File editing - back reference # ###################################################################### body common control { version => "1.2.3"; bundlesequence => { "testbundle" }; } ######################################################## bundle agent testbundle { files: # The back reference in a path only applies to the last link # of the pathname, so the (tmp) gets ignored "/tmp/(cf3)_(.*)" edit_line => myedit("second $(match.2)"); # but ... # "/tmp/cf3_test" # create => "true", # edit_line => myedit("second $(match.1)"); } ######################################################## bundle edit_line myedit(parameter) { vars: "edit_variable" string => "private edit variable is $(parameter)"; insert_lines: "$(edit_variable)"; }