amarao (amarao_san) wrote,
amarao
amarao_san

How to bump bind serial in the zone database with sed

sed -r 's/(.*)([0-9]+)(.*;serial number.*)/echo "\1$((\2+1))\3"/ge' domain.example.db

И оно даже обрабатывает случай переполнения int32 правильно.
Tags: bash, bind, howto, sed
Subscribe

  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 2 comments