control: hashtable= ( A("key1","value1") A("key2","value2") )
solaris:: hashtable= ( A ("solaris_specific_thingie","value3") )
Great! The problem comes when it is time to extract these values. What I desperately need is something
that expands to all the keys in the associative array, but I can't find such an animal. Any ideas?
Here's what I am currently doing:
shellcommands:
!solaris::
"/some/script/that/uses/classes/as/args.sh $(hashtable[key1]) $(hashtable[key2])"
solaris::
"/some/script/that/uses/classes/as/args.sh \
$(hashtable[key1]) $(hashtable[key2]) $(hashtable[solaris_specific_thingie])"
Obviously, this is not a good way to go; there is a lot of repeat typing, and any time I add a key I have to add it to the output section as well. Here's what I would like to do:
shellcommands: any:: "/some/script/that/uses/classes/as/args.sh $(hashtable[*])"
....where $(hashtable[*]) expands to everything in the hashtable. I'd be happy with just about any syntactic device that did not require me to track all of my keys.
I've also tried keep track of keys in a list variable, but I couldn't get the iteration to work when the iterated variable is inside the associative [brackets].
Has anyone come up with a clever way around this problem?
--
Chip Seraphine Unix Administrator TradeLink, LLC 312-264-2048 [EMAIL PROTECTED]
_______________________________________________ Help-cfengine mailing list Help-cfengine@gnu.org http://lists.gnu.org/mailman/listinfo/help-cfengine