I need a simple command line utility to remove entries from a configuration file. In Particular, named.conf.
Use perl/php/c .. I just need well commented code.
Or just a function ... (for either)
Need to call with 2 arguments:
zone to remove, path to find file to edit
You'll be searching for this:
[semicolons removed due to sl filtering]
zone "[login to view URL]" {
type master[semicolon]
file "/var/named/servername/[login to view URL]"[semicolon]
}[semicolon]
And removing from "zone" all the way to the blank line under the last }.
It is very important that only one blank line remain between entries and that the file is kept very neat. Trailing blanks /etc need to be removed, and it must never leave any extra characters.
I have done a few myself that work fine for weeks then all of a sudden an extra semicolon or long gaps of spaces appear.
Other scripts looking at [login to view URL] are getting thrown off by the whitespaces. Any garbage characters and we will have problems. Please bid if you have some good tried and tested string manipulation functions that can do this right, every time. I'll run this in a large loop and take a look at the output.. please be sure your price includes fixing any bugs VERY quickly if they are discovered.
Ideally this could be used on other text config files (like [login to view URL]) with some modification.
Thanks -
-- Sage