help-cfengine
[Top][All Lists]
Advanced

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

Re: Need 'UncommentAndSetValue' or some such


From: Christopher Browne
Subject: Re: Need 'UncommentAndSetValue' or some such
Date: Thu, 27 Oct 2005 12:41:03 GMT

> Christopher Browne wrote:
>> I'd *love* to have something that would say something like...
>>   AssignField LHS="com.foo.bar.jdbc.url"
>>               RHS="pgsql:$(dbhost):$(dbport):$(dbuser)"
>>               separator="="
>
> Did someone consider code along the lines of
> SplitOn = ( = )
> SetLine "com.foo.bar.jdbc.url=pgsql:somehost:5432:user"
> ReplaceLinesMatchingField "1"
> ?

That would do it too, although I think the syntax needs to involve
using one command, with multiple parameters, not three with one.

Maybe...

 SetLine Value = "com.foo.bar.jdbc.url=pgsql:somehost:5432:user"
         Separator = ( = )
         MatchField = ( 1 )

The point is to have a reasonably elegant syntax for this, as that is,
after all, the point of cfengine.
-- 
(reverse (concatenate 'string "moc.liamg" "@" "enworbbc"))
http://cbbrowne.com/info/
If we were meant to fly, we wouldn't keep losing our luggage.


reply via email to

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