From owner-freebsd-questions Mon Feb 22 10:37:54 1999 Delivered-To: freebsd-questions@freebsd.org Received: from java.dpcsys.com (java.dpcsys.com [206.16.184.7]) by hub.freebsd.org (Postfix) with ESMTP id AA73B1198C for ; Mon, 22 Feb 1999 10:37:43 -0800 (PST) (envelope-from dan@dpcsys.com) Received: from localhost (dan@localhost) by java.dpcsys.com (8.9.1a/8.9.1) with SMTP id KAA25964; Mon, 22 Feb 1999 10:38:37 -0800 (PST) Date: Mon, 22 Feb 1999 10:38:37 -0800 (PST) From: Dan Busarow Reply-To: Dan Busarow To: Hugh Blandford Cc: questions@FreeBSD.ORG Subject: Re: Changing large no. of DNS records In-Reply-To: <3.0.6.32.19990222183859.008b0100@mail.island.net.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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