####################################################### # # Insert a number of lines with vague whitespace # ####################################################### body common control { any:: bundlesequence => { "insert" }; } ####################################################### bundle agent insert { vars: "v" string => " One potato"; files: "/tmp/test_insert" create => "true", edit_line => Insert("$(insert.v)"); } ####################################################### # For the library ####################################################### bundle edit_line Insert(name) { insert_lines: " $(name)" whitespace_policy => { "ignore_leading", "ignore_embedded" }; } ####################################################### body edit_defaults empty { empty_file_before_editing => "true"; } ####################################################### # # Insert a number of lines # ####################################################### body common control { any:: bundlesequence => { "insert" }; } ####################################################### bundle agent insert { vars: "v" string => " One potato Two potato Three potatoe Four "; files: "/tmp/test_insert" create => "true", edit_line => Insert("$(insert.v)"), edit_defaults => empty; } ####################################################### # For the library ####################################################### bundle edit_line Insert(name) { insert_lines: "Begin$(const.n)$(name)$(const.n)End"; } ####################################################### body edit_defaults empty { empty_file_before_editing => "false"; } ####################################################### # # Insert a number of lines # ####################################################### body common control { any:: bundlesequence => { "insert" }; } ####################################################### bundle agent insert { vars: "v" slist => { "One potato", "Two potato", "Three potatoe", "Four" }; files: "/tmp/test_insert" create => "true", edit_line => Insert("@(insert.v)"); # edit_defaults => empty; } ####################################################### # For the library ####################################################### bundle edit_line Insert(name) { insert_lines: "$(name)"; } ####################################################### body edit_defaults empty { empty_file_before_editing => "true"; }