Alert on change of SOA in domain

This comes from unpleasant experience of mine. One of my clients’ domain records (MX for the case involved) was mistakenly changed. While it was a human error and trying to fix humans is rolling the rock of Sisyphus,damage would be much lesser had I known about the change immediately . To take care of this side of the story I wrote awk one-liner that when invoked by cron compares SOA of the domain with the one saved locally in the file. If there is a discrepancy the mail is sent.
I tried to find more elegant solution on Google but found zillions of tools too complex for such a simple task.

    awk '  BEGIN {"dig +short soa"| getline
    getline SOA < ""
     if (SOA_NOW != SOA) { print (" mail -c -s \"SOA of domain has changed\"") | "/bin/bash" }}'

Follow me on not to miss what I publish on Linkedin, Github, blog, and more.