Forum: Cfengine Help
Subject: Re: Append line to file if the regex did not match
Author: charming88
Link to topic: https://cfengine.com/forum/read.php?3,22254,22287#msg-22287
Let me say, incidentally, official timberland boots that some of you may say,
Well, that's all right, Senator, t
On 5/26/11 9:34 PM, Aleksey Tsalolikhin wrote:
> Thanks for sharing, Sjoerd. How do you use this?
>
> I can imagine a use for appending a line if it is not already in a file,
> but what is the scenario where you want to append a line if some
> other regex is not in a file?
>
I'm using it in my yum
Forum: Cfengine Help
Subject: Re: Append line to file if the regex did not match
Author: bbomgardner
Link to topic: https://cfengine.com/forum/read.php?3,22254,22256#msg-22256
Thanks Sjoerd!
I might use something like this if I wanted to allow local changes to be made
in a file by someone
Thanks for sharing, Sjoerd. How do you use this?
I can imagine a use for appending a line if it is not already in a file,
but what is the scenario where you want to append a line if some
other regex is not in a file?
Thanks very much,
Aleksey
On Thu, May 26, 2011 at 7:54 AM, Sjoerd Oostdijck
I wracked my brain over this one for some reason, and it turned out to
be so simple... I did find a few old threads asking for this, so I
though I'd share:
# Appends the supplied line if the regex supplied did not
# match an already existing line.
#
# files:
# "myfile.txt"
# edit_line => ap