[Top][All Lists]

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

Re: Multi line iterator string?

From: Brendan Strejcek
Subject: Re: Multi line iterator string?
Date: Tue, 22 Jun 2004 12:51:24 -0500
User-agent: Mutt/1.3.28i

Chip Seraphine wrote:

> I want to set an (iterator)  variable to a list that is several hundred 
> characters long.  Obviously, I'd like to be able to wrap the line within my 
> cfengine file.  How can I safely do this for an iterator variable?  I've had 
> no luck trying things like:
>       listvar= ( "item1:item2:item3:item4:\
>                        item5:item6:item7" )

You could do it by interpolating some variables in another variable:

#!/usr/local/sbin/cfagent -qKf
    actionsequence = ( shellcommands )
    var1 = ( "asdfasdfasdfasdfasdf:asdfasdfasdfasdfasdf:asdfasdfasdfasdfasdf" )
    var2 = ( "asdfasdfasdfasdfasdf:asdfasdfasdfasdfasdf:asdfasdfasdfasdfasdf" )
    var3 = ( "asdfasdfasdfasdfasdf:asdfasdfasdfasdfasdf:asdfasdfasdfasdfasdf" )
    var4 = ( "asdfasdfasdfasdfasdf:asdfasdfasdfasdfasdf:asdfasdfasdfasdfasdf" )
    iter = ( ${var1}:${var2}:${var3}:${var4} )
shellcommands: "/bin/echo ${iter}"

reply via email to

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