Scripting Help

Kurt Boyack kboyack at gmail.com
Mon Apr 18 00:08:18 UTC 2005


On 4/17/05, bill at randomdog.net <bill at randomdog.net> wrote:
> I sorry if this is a littler off topic but...
>=20
> My company recently acquired about 80 domains and I've been tasked with
> setting up DNS for these domains.
>=20
> They will all point to the same IP address. Does any one know of a script
> that with help with setting up all of the domains without having to key 8=
0
> new db files?
>=20
> Thanks in Advance
>=20
> Bill Heese
> Senior Macintosh LAN Administrator
> Conair Corporation
>=20

If you have access to a UNIX shell, you could do the following. Create
two files. One file with the domain names, 1 per line (domain.list).
And the other file a generic db file (db.DOMAIN). Use DOMAIN in the
db.DOMAIN file wherever the domain name should be. Then you can run
something like this:

while read DOMAIN
do
   sed "s at DOMAIN@$DOMAIN at g" < db.DOMAIN > db.$DOMAIN
done < domain.list

You can put the above script into a file to make it easier to edit and
execute. This will create a db file for every domain listed in
domain.list, and will save you a lot of typing.



More information about the bind-users mailing list