[sdnog] shell Script for DNS
Samir S. Omer
samir.saif at sudren.edu.sd
Mon Jan 11 11:38:59 SAST 2016
Hi manhal
can you share with us your script ?
also you can check the follwoing
- bash version
- if you are in the correct path
- typos and wrong spelling in the script
- run your script in debug mode (bash -x your_script).
Samir
----- Original Message -----
From: "Manhal Mohammed" <manhal_muhamed at hotmail.com>
To: sdnog at sdnog.sd
Sent: Monday, January 11, 2016 10:45:21 AM
Subject: [sdnog] shell Script for DNS
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 ^_^
_______________________________________________
sdnog mailing list
sdnog at sdnog.sd
http://lists.sdnog.sd/mailman/listinfo/sdnog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sdnog.sd/pipermail/sdnog/attachments/20160111/3291009e/attachment.html>
More information about the sdnog
mailing list