I bit the bullet and upgraded since that seemed to be an extremely useful function - a lot less painful than I expected - it took less than an hour to upgrade 14 systems manually, probably would have been a few minutes if I could have figured out how to use cfengine to upgrade itself. Future project... ________________________________________ From: help-cfengine-boun...@cfengine.org [help-cfengine-boun...@cfengine.org] On Behalf Of Eric Black [ebl...@higherone.com] Sent: Friday, March 05, 2010 4:29 PM To: help-cfengine@cfengine.org Subject: Is regextract in version 3.0.3?
Hi, I'm using community version 3.0.3 and I'm getting the following error: cf3:./test.cf:34,96: Unknown built-in function regextract(), near token ')' Is there another way of extracting values into strings with 3.0.3? I'm hoping I don't have to upgrade all the servers to 3.0.4 yet. This is what I was trying to do: bundle agent test { vars: "fqdn" string => execresult("/usr/bin/dig +short -x $(sys.ipv4) | grep $(sys.host) | sed -e 's/\.$//'","useshell"); classes: "ok" expression => regextract("^([^\.]*)\.(.*)\.$","$(fqdn)","hostname_domain"); reports: ok:: "HOST + DOMAIN: $(hostname_domain[0])"; "HOST: $(hostname_domain[1])"; "DOMAIN: $(hostname_domain[2])"; } Thanks, Eric _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine