Date: Tue, 20 Apr 1999 14:19:36 -0700 (PDT) From: Doug White <dwhite@resnet.uoregon.edu> To: Hugh Blandford <hugh@island.net.au> Cc: questions@FreeBSD.ORG Subject: Re: OFF TOPIC change a number of DNS SOAs Message-ID: <Pine.BSF.4.03.9904201417560.1514-100000@resnet.uoregon.edu> In-Reply-To: <3.0.6.32.19990420151157.00800100@mail.island.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 20 Apr 1999, Hugh Blandford wrote: > Hi All, > > have had to go through and change all my mail secondary info in my zone > files. Someone was kind enough to give me a PERL script to do a search and > replace. However, I was wondering if there was a command that I could run > that would go through and change all the serial numbers (which vary wildly) > to a new one. It would basically need to be run against all the files in a > particular directory. > > eg: 1998072502 to 1999041601 It's all about regex's. If all of them have 'serial' somewhere on the line, it's an easy match. perl -pi.old -e 's/\s+\d+.*serial$/1999041601 \; Serial/i' files ... I just did this two weeks ago, as you might guess :) Doug White Internet: dwhite@resnet.uoregon.edu | FreeBSD: The Power to Serve http://gladstone.uoregon.edu/~dwhite | www.freebsd.org 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.4.03.9904201417560.1514-100000>