[sdnog] shell Script for DNS
Manhal Mohammed
manhal_muhamed at hotmail.com
Mon Jan 11 08:45:21 SAST 2016
helloooo Sdnoggers ^_^
i have a question on shell scripting :) i'm trying to make a shell script to change IPs , adding new domains on DNS and many other operations to make it easier for me :D
on "creating new domain" section of this script :
i have a zone file "ext.example.sd"witch i want to copy to the new domain which is a "variable" so : this is my idea of how this simple section of my script will be :
##########
echo ENTER YOUR DOMAIN : read new_domain cp ext.example.sd ext.$new_domain.sd # this is not working :D sed -i -e 's/20[0-9][0-9]\{6\}/2016011100/g' ext.$new_domain.sd #to reset the serial num
###########
reconsider that the copied new zone have to be renamed as : "ext.new_domain.sd.zone " new_domain is a variable
thanks in advance :)
Mnhl ^_^
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sdnog.sd/pipermail/sdnog/attachments/20160111/2224f522/attachment.html>
More information about the sdnog
mailing list