Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Feb 1999 10:38:37 -0800 (PST)
From:      Dan Busarow <dan@dpcsys.com>
To:        Hugh Blandford <hugh@island.net.au>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Changing large no. of DNS records
Message-ID:  <Pine.BSF.3.96.990222103438.6495G-100000@java.dpcsys.com>
In-Reply-To: <3.0.6.32.19990222183859.008b0100@mail.island.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 22 Feb 1999, Hugh Blandford wrote:
> I'm changing IP addresses of a nameserver :((  I also need to change the MX
> records in all my zone files.  Is there a utility that I can make look in
> each file in a directory and do the equivalent of a global search and replace.

sed

# cd /etc/namedb
# for i in db.*
# do
# sed -f sedfile $i > $i.out
# mv $i $i.save
# mv $i.out $i
# done

# cat sedfile
s/IN MX 10 mail.my.domain./IN MX 10 newmail.my.domain./g

Change to match your installation.

Dan
-- 
 Dan Busarow                                                  949 443 4172
 Dana Point Communications, Inc.                            dan@dpcsys.com
 Dana Point, California  83 09 EF 59 E0 11 89 B4   8D 09 DB FD E1 DD 0C 82




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990222103438.6495G-100000>