Hi,

Wondering if someone help with writing a perl script to do this:

Before:
;BIND DUMP V8
$ORIGIN com.
metropolitanbathtile    86400   IN      NS      ns1.ly.com.     ;Cl=2
        86400   IN      NS      ns2.ly.com.     ;Cl=2
        86400   IN      SOA     ns1.ly.com. webmaster.friend.ly.net. (
                2005011101 10800 3600 604800 86400 )    ;Cl=2
        86400   IN      A       12.167.149.135  ;Cl=2
$ORIGIN metropolitanbathtile.com.
*       86400   IN      A       12.167.149.135  ;Cl=2

After:

;BIND DUMP V8
$ORIGIN com.
metropolitanbathtile    86400   IN      NS      ns1.ly.net.     ;Cl=2
        86400   IN      NS      ns2.ly.net.     ;Cl=2
        86400   IN      SOA     ns1.ly.net. webmaster.friend.ly.net. (
                2005011102 10800 3600 604800 86400 )    ;Cl=2
        86400   IN      A       12.167.149.135  ;Cl=2
$ORIGIN metropolitanbathtile.com.
*       86400   IN      A       12.167.149.135  ;Cl=2


--- replace ly.com to ly.net
--- if mail.ly.com exist, then replace with email.ly.net
--- increment serial: 2005011101 to 2005011102


I know I can do this easily with sed but don't know how to increment the
serial number.

Thx in advance


_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to