Final version, with comments, for possible inclusion in the reference manual:
bundle agent example
{
# INPUT
# Please create the following files before running this example:
# /tmp/cf2_test1
# /tmp/cf3_test2
files:
"/tmp/(cf[23])_(.*)"
edit_line => report_match_variables("$(match.0) $(
I have the following working example of using the
special match variable with file names:
First, we have three files we'll be matching on:
[cfengine00 cfengine_examples]# ls -l /tmp/cf*test*
-rw-r--r-- 1 root root 29 May 14 12:37 /tmp/cf2_test
-rw-r--r-- 1 root root 29 May 14 12:38 /tmp/cf3_test
P.S. And why does it say "second" in the myedit() paramaters?
___
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine
Hi. I am looking at section "12.3 Variable context match" and it says:
Each time cfengine matches a string, these values
are assigned to a special variable context $(match.n).
The fragments can be referred to in the remainder of
the promise. this makes sense ...