help-cfengine
[Top][All Lists]
Advanced

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

Re: How do I add multimple strings


From: Adrian Phillips
Subject: Re: How do I add multimple strings
Date: 14 May 2002 08:28:39 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "Tanovic" == Tanovic Branko <tanovic@bitsyu.net> writes:

    Tanovic> Can I add multiple strings like { /etc/ppp/ioptions

    Tanovic> BeginGroupIfNoSuchLine "noipdefault" ,"-vj" , ....... and
    Tanovic> so on then EmptyEntireFilePlease

    Tanovic> Append "noipdefault" , "-vj" ....... and so on

    Tanovic> EndGroup How can I do this or some other way

No, only that which is in the manual :-) editfiles is a single line
matcher. I would like a multiline editfiles capability, for example,
adding libpcre functionality but I'm not sure Mark would be overly
entusiastic :-)

If you want to emulate this you're going to have to do soemthing like
:-

BeginGroupIfNoSuchLine "<first line to match>"
        LocateLineMatching "<next line>"
        LocateLineMatching "<next line>"
        ...
EndGroup

If any LocateLineMatching fails to match then the whole thing will
abort. You can use CatchAbort to catch aborts in the middle and
continue.

    Tanovic> Tnx Very Much a specialy to Adrian Phillips

Your welcome.

Sincerely,

Adrian Phillips

-- 
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]



reply via email to

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