The way I've solved this in the past is to create a zone file template with
"variables" in the text that are easy to find. EG:

[TIMESTAMP]

is where the number goes. All my zone files are managed by a script that
parses the template files with values appropriate for each domain.

On Wed, Oct 17, 2018 at 11:05 AM Mike Wright <nob...@nospam.hostisimo.com>
wrote:

> Hi all,
>
> I have a set of dns zone text files in "bind" format.  On the fourth
> line there is a 10 digit timestamp (ignoring white space, the first
> field).  There is no way to predetermine the value so search and replace
> by value is a no go and seems to require some positional approach such
> as "line 4, first 10 digit field".
>
> What is the easiest way to replace each of them with the same value,
> $(date +%s) ?
>
> My sed|awk foo is weak.
>
> Any takers?
>
> TIA,
> Mike Wright
> _______________________________________________
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
>
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to