Quick Freeze / Thaw of Reverse Zones

I had to update several reverse zone files today, so wrote a quick for-loop in bash to freeze and thaw all the zones. The script parsed the zone file names and reversed them into a proper d.c.b.a.in-addr.arpa format. Later I tweaked it with sed to make it more flexible (in order to pass it a full or partial IP address), but ended up using tac for the reversing part instead – that’s what it’s made for after all. And if you’re wondering what tac stand for, just read cat backwards. :-)

Here’s an example of it’s use. You can give it a full or partial IP, and/or one or more zone filenames with or without shell wildcards.