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 <mjs@miju.com.au> | 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.)
Attachment:
pgptpmL1E9TIj.pgp
Description: PGP signature