Over a million developers have joined DZone.

Change SOA Serial In DNS Hosts File Config

·

# bump_serial.sh
#!/bin/bash

perl -i.bak -pe 'BEGIN {chomp ($now=qx/date +%Y%m%d/)};
    /(\d{8})(\d{2})/ and do {
        $serial = ($1 eq $now ? $2+1 : 0);
        s/\d{8}(\d{2})/sprintf "%8d%02d",$now,$serial/e;
}' name.hosts
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}