Re: bind: changing many serials at once
Mark Suter wrote: > I suspect that perl can save you a lot of work, for example, > > perl -pi'.old' -e 's/\d{10}/2001100101/' * I did. Thank you very much. -- Best Regards, Marek L. Kozak -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: bind: changing many serials at once
Marek, > I need to change serials in multiple zone files. All zones will have the > same new serial. > I don't want to do it manualy. Simple sed 's/regexp/new_pattern/g' is > not an option - serials differ. I could write a C program, but I think > there's some other way. I suspect that perl can save you a lot of work, for example, perl -pi'.old' -e 's/\d{10}/2001100101/' * will edit all files in the current directory and replace any ten digit number with "2001100101". A backup of each file is kept; however, I've used this in the past with no problems. Yours sincerely, -- Mark John Suter <[EMAIL PROTECTED]> | I have often regretted my Miju Systems http://www.miju.com.au/ | speech, never my silence. mobile 0411 262 316 gpg key F2FEBB36 | Xenocrates (396-314 B.C.) PGP signature
Re: bind: changing many serials at once
"Marek L. Kozak" wrote: > > I need to change serials in multiple zone files. All zones will have the > same new serial. > I don't want to do it manualy. Simple sed 's/regexp/new_pattern/g' is > not an option - serials differ. I could write a C program, but I think > there's some other way. If you want to use a tool to generate your zone files, try dnstool. Info is available at http://www.gormand.com.au/tools/dnstool/guide.html It consists of perl scripts working on a directory structure. A central makefile allows you to regenerate zone files and so to change their serial. Then copy just the zonefiles you are interested into your dns area. That's my way to do it. YMMV. I find this tool particularly useful for lots of virtual servers as you can link domain definitions to prototype files saving a lot of typing. Dirk Niemeyer -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
bind: changing many serials at once
Hi list, I need to change serials in multiple zone files. All zones will have the same new serial. I don't want to do it manualy. Simple sed 's/regexp/new_pattern/g' is not an option - serials differ. I could write a C program, but I think there's some other way. -- Pozdrawiam, Marek L. Kozak -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]