Forum: Cfengine Help
Subject: Re: search and replace help
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,20275,20281#msg-20281

I tried Diego's advice but CF gave me warnings.  This is why I was going to the 
negative lookahead.
 -> Promised replacement "    HISTSIZE=7200" on line "    
HISTSIZE=7200200" for pattern "HISTSIZE=.*$" is not 
convergent while editing /tmp/profile.suse

Using HISTSIZE=(?!7200).* works but I run into a logic problem.  Some profiles 
have a histsize defined which I want to replace.  Others have nothing which 
which means that I want HISTSIZE appended.  The current search and replace 
promise can be kept if HISTSIZE is correct or even if there is no HISTSIZE at 
all.  This makes it difficult to initiate an append.

_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to