[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to use iteration over list variable in copy action ? ( text mode
Re: How to use iteration over list variable in copy action ? ( text mode)
Thu, 12 Jan 2006 09:08:13 -0600
Mozilla Thunderbird 1.0.7 (X11/20050923)
If you leave the dest= directive as a path with no filename, i.e.
dest=/tmp/, does that work? I don't have any examples of doing a copy
like that in my cf.* files, but I can't imagine any other way they would
have implemented iteration.
Paul Krizak 5900 E. Ben White Blvd. MS 625
Advanced Micro Devices Austin, TX 78741
Linux/Unix Systems Engineering Phone: (512) 602-8775
Microprocessor Solutions Sector
Yves Blusseau wrote:
I want to use a list to copy some files.
The tutorial manual said that the list can be use only in the "from" field
of a copy action:
It is convenient to be able to use such variables to force cfagent to
iterative over a list. This gives us a compact way of writing repeated
operations and it allows a simple method of communication with the shell
environment. For security reasons, iteration is supported only in the
* in the `from' field of a copy action
I write this little script:
listOfFiles = ( foo:bar:baz )
But the above fails, since it try to copy every files (foo, then bar, then
baz) to /tmp/foo:bar:baz (the list in dest isn't split).
So how to write a copy action with a list of source files ?
Thanks in advance.
Help-cfengine mailing list