help-cfengine
[Top][All Lists]
Advanced

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

Re: Multiple line matching and replace in editfiles


From: James Treleaven
Subject: Re: Multiple line matching and replace in editfiles
Date: Tue, 14 Sep 2004 12:22:51 -0400
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

I found myself also wanting to "edit" multiple lines today with 'editfiles'. In my case, it is because radiusd.conf has a 'paragraph style' layout, and I need to make sure that 'sql' is listed in the following stanza:

authorize {
  preprocess
  sql
  files
}

Unfortunately, it looks to me like editfiles is line based and it cannot do this for me. I think I have no choice but to use an external perl script. I really wish that shellcommands took a 'if-this-named-file-has-changed-run-this-shellcommand' option, because the whole set-a-class-to-kick-off-a-shellcommand idiom is pretty kludgey in my eyes.

cheers,
James





reply via email to

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