in reply to Re^10: Deleting lines from named.conf file
in thread Deleting lines from named.conf file
Call that script with the zone file as argument, e.g.#!/usr/bin/perl -w -ni.bak -00 use strict; BEGIN { local $/ = "\n"; print "please enter the domain name: "; use vars qw($targetdomain); chomp ($targetdomain = <STDIN>); } print unless /^zone\s+"$targetdomain"/;
perl zonedel.pl /home/blackice/hello
It will create a backup of the file. For the switches after '#!/usr/bin/perl' see perlrun.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^12: Deleting lines from named.conf file
by firewall00 (Acolyte) on Nov 14, 2007 at 03:32 UTC | |
|
Re^12: Deleting lines from named.conf file
by firewall00 (Acolyte) on Nov 12, 2007 at 02:41 UTC |