[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using nawk with cfengine

From: Brendan Strejcek
Subject: Re: Using nawk with cfengine
Date: Fri, 18 Jun 2004 10:41:29 -0500
User-agent: Mutt/1.3.28i

The problem seems to be in how cfagent parses the parentheses.

$ cat
#!/usr/local/sbin/cfagent -qKf
control: actionsequence = ( shellcommands )
var = ( ExecResult(/usr/bin/awk '/search/ { print $2 }' /etc/resolv.conf) )
shellcommands: "/bin/echo ${var}"
$ ./  
cfengine::/bin/echo cs.uc:

If you don't really need it upper case, the above works. If you change
that to { print toupper($2) }, cfagent pukes.

Summary: don't use parentheses within ExecResult arguments.

Example run on OpenBSD 3.5 with cfengine 2.1.6.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]