Skip to content

Instantly share code, notes, and snippets.

@x-way
Created May 26, 2013 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x-way/5651802 to your computer and use it in GitHub Desktop.
Save x-way/5651802 to your computer and use it in GitHub Desktop.
Update the serial number in BIND zone files with the current unix timestamp
#!/bin/bash
sed -i -e "s/[0-9]\{10\}/$(date +%10s)/" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment