#!/bin/sh

ROOTFILE=./db.root

date=`date '+%Y-%m-%d'`
cat >$ROOTFILE <<EOT
;;
;;  db.root -- Internet Root Nameservers
;;  DO NOT EDIT, IT WAS AUTOMATICALLY CREATED ON $date BY db.root.sh!
;;

EOT
dig @A.ROOT-SERVERS.NET . NS |\
awk '
  /IN NS/ { printf("%-20s 99999999  IN  NS  %s\n", $1, $NF); }
  /IN A/  { printf("%-20s 99999999  IN  A   %s\n", $1, $NF); }
' |\
sort >>$ROOTFILE
echo "" >>$ROOTFILE

