help-cfengine
[Top][All Lists]
Advanced

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

Re: Append line with a backslash at the end?


From: Mark Burgess
Subject: Re: Append line with a backslash at the end?
Date: Thu, 25 Sep 2003 08:51:10 +0200 (MEST)

On 23 Sep, Lars Damerow wrote:
> Hi folks,
> 
> I want to use cfengine to write a file that has backslashes as the
> last character of some of its lines. I can't find the right way to do
> it, though.
> 
> I tried using this:
> 
>     Append "foobar \\"
>     Append "blah \\"
> 
> but cfengine insists on using the backslash to escape the quote at the
> end of the line, giving me this QSTRING:
> 
> QSTRING "foobar \\"
>             Append "
> 
> I get the same QSTRING if I only put one backslash. If I put a space
> in between the slashes and the quote, cfengine gets close:
> 
> QSTRING "foobar \ "
> 
> ...but am-utils won't read lines with a space after the continuation
> character.
> 
> How does one do this correctly? Please CC me on any responses as I
> don't belong to the list.
> 
> Thanks very much!
> -lars
> 
> ___________________________________________________________
> lars damerow
> button pusher
> pixar animation studios
> lars@pixar.com
> 
> "Okay, there's the house. I'm not stopping the car, so you'll have to
> jump out."
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine


Hi. You don't say what version you are using, but this works for me:



control: actionsequence = ( editfiles )


editfiles:

{ /tmp/inetd.conf

AppendIfNoSuchLine "nsland\\"

}

I am using 2.1.0b2, but that is essentially the same as
2.0.8p1 and higher which you ought to upgrade to ASAP.

M


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  Mark.Burgess@iu.hio.no
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

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