> I know I can do that with grep, but you see I have 270 domains to delete
> from my named.conf. 
> 
> My question was more: has anyone got a working script that I can use in
> order to delete name from my "named.conf" file ? 

cat named.conf | \
    awk 'BEGIN {suppress = 0}
         /zone "whatever.com"/ {suppress = 1}
         {if (suppress == 0) print; if ($1 == "};" && NF == 1) suppress = 0}'

Or words to that effect.  Works as long as the zones are always formatted
the same way.

--
Evan Hunt -- [email protected]
Internet Systems Consortium, Inc.
_______________________________________________
bind-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to