Thank you Nakarin .. a lot!
On 04/30/2010 11:54 AM, Nakarin Phooripoom wrote:
> I'm afraid you can't make functions (like a normal programming does) in
> cfengine.
>
> To get closed to your expectation, you might need to create global variables
> (bundle common) of the outputs of your commands/s
ate common slist variable over local variables so
you need to pass a global slist variable to a local one in your bundle.
Cheers,
--Nakarin
On Apr 27, 2010, at 4:24 PM, Jakub Viták wrote:
> Hi again.
>
> If anyone have a little free time, I will be very grateful if give few
> tips abo
Hi again.
If anyone have a little free time, I will be very grateful if give few
tips about functions.
Thank you, Jakub V.
Original Message
Subject:Re: simple return array from other "code"
Date: Mon, 26 Apr 2010 08:03:55 +0200
From: Jakub Viták
To:
You could get a string from a shell command by execresult() then split the
string up to an slist by splitstring()
##
vars:
"result" string => execresult("/bin/ls /","noshell");
"split" slist => splitstring("$(result)"," ","100");
reports:
Yr2010::
"Found: $(split)";
##
Hi.
I am novice to cfengine and I am trying to understand how it works.
I understand some classes defined "flow", but I would like to know howto
generate slist
from command - shell script or even some agent class.
Something like this:
vars:
"my_list" slist = generate_somwhere_else();
repor