>>>>> "Derek" == Derek J Balling <[email protected]> writes:
Derek> On Apr 20, 2011, at 4:37 PM, John Stoffel wrote: >> So when our script updates the SOA serial number, it pulls the one out of >> the file, but that's invariably wrong because the SOA serial has been >> steadily incrementing due to DDNS updates. Fun. Derek> I understand you don't want to update this script, but is it Derek> seriously too difficult to do, instead of some code that uses a Derek> regular-expression to pull the serial number out of a file, Derek> something like: Derek> $ FOO=`dig +short @ns1.megacity.org megacity.org soa | cut -f 3 -d ' '` ; echo $FOO Derek> 2011041503 This might be the way to go, esp if I then add 10 or 100 to the SOA to make sure my updates get pushed in preference to any DDNS updates that come in while I'm changing things. Derek> and get the current serial number that way? Derek> It seems to me that this would require one or two lines of Derek> change in the code to grab the output of that and stuff it into Derek> your "last serial number" value, no? This I think is the right answer for my current pain. Of course since my dig is ancient as well, the +short option doesn't exist, but grep and awk work just fine... Thanks Derek. John _______________________________________________ Tech mailing list [email protected] https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech This list provided by the League of Professional System Administrators http://lopsa.org/
