Make changes en mass [done]

Jeff Lightner jlightner at water.com
Tue Mar 24 20:53:40 UTC 2009


Good point.  

The serial number should be updated since the zone file is being
updated.  The sed command could be used to do that as well.

for zonefile in `ls *.com`
do sed -e s/604800/709600/ -e
s/200[0-9][0-1][0-9][0-9][0-9][0-9][0-9]/2009032401/ $zonefile
>${zonefile}.new
   mv $zonefile ${zonefile}.old
   mv ${zonefile}.new $zonefile
done

The above does the same expiration value replacement as earlier and also
changes the serial number to current day (2009032401 as of this
writing).   This substitution is based on the preferred serial number
syntax of:
CCYYMMDDsq where sq is a sequence number (01 being first).   It assumes
all the zone files have a current serial number using that in the
current decade (2000s) and no sequence number higher than 99.   The
pattern would have to be adjusted if those assumptions weren't valid.

-----Original Message-----
From: bind-users-bounces at lists.isc.org
[mailto:bind-users-bounces at lists.isc.org] On Behalf Of Alan Clegg
Sent: Tuesday, March 24, 2009 4:31 PM
To: bind-users at lists.isc.org
Subject: Re: Make changes en mass [done]

John D. Vo wrote:
> Thanks Jeff. I prefer your way better, more eloquent than the brute
> force method I did.

To this point, nobody has updated the serial.

AlanC
 
Please consider our environment before printing this e-mail or attachments.
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------



More information about the bind-users mailing list