J
joe shaboo
Hi again,
I'm still working on a dns script. Last time I received some help and
everything works as it should. Basically, it takes the named.conf file
and comments out the next 5 lines of a domain that is given. THis
works great if the domain is hardcoded into the script.
What I'm trying to do is run through a file, and comment out names in
my named.conf file that are no longer hosted.
The script basically has
@ARGV = ("named.conf")
while (<>) {
if (/\b<a new domain feed from a list>/) {
$commenting = 1;
}
print "//" if $commenting;
print;
$commenting = 0 if /^\s*}/;
}
exit;
How can I pass in a new variable from file1, in some kind of for loop?
So, it will individually go through file1, which contains, test.com,
test.net, test.org, test.ws, and comment them out of my named.conf.
Also, alternatively, it would be nice to pass the name of the domain
at the command line. Simple, right...
Thanks,
Joe
I'm still working on a dns script. Last time I received some help and
everything works as it should. Basically, it takes the named.conf file
and comments out the next 5 lines of a domain that is given. THis
works great if the domain is hardcoded into the script.
What I'm trying to do is run through a file, and comment out names in
my named.conf file that are no longer hosted.
The script basically has
@ARGV = ("named.conf")
while (<>) {
if (/\b<a new domain feed from a list>/) {
$commenting = 1;
}
print "//" if $commenting;
print;
$commenting = 0 if /^\s*}/;
}
exit;
How can I pass in a new variable from file1, in some kind of for loop?
So, it will individually go through file1, which contains, test.com,
test.net, test.org, test.ws, and comment them out of my named.conf.
Also, alternatively, it would be nice to pass the name of the domain
at the command line. Simple, right...
Thanks,
Joe