Being a beginner in scripting I am not sure the direction to take to accomplish the below task and would love suggestions.
GOAL
input file: domains.list
Read input file, search in named.conf and find domain and delete entry for the purpose of cleanup activity.
named.conf entry example
So the file somehow needs to read line by line the domains then look in the named.conf for exactly "hosangit.biz" (not na.hosangit.biz) and then remove everything from the word zone to the last }; prompt
Take into account the entry may be commented out like the following
Would love to have a list of what was removed as well so I can validate everything is okay.
Suggestions on which route to take? Is this doable in korn scripting or awk scripting. I think someone said sed would be helpful with the searching portion. Again, I'm new and want to learn. Instead of altering 2000+ domains on 5 different servers manually (which I have been doing) it seems there should be a way to do this via a script.
That code works great RudiC exporting the actual entire zone into its own text file. (Creating Backups of the domains). I'll admit the code is way advanced. I'm going to try and break down each of your steps so I can learn how you did it and see if I can apply it to the remove portion. Thank You for giving me that push.
A couple of spare disks have been added to a Solaris 10 system, and one of them has a corrupt zpool on it.
I don't care about the data: I want to destroy it and re-use the disk, but it's corrupt so I can't import it. The corrupt pool is called "rpool" so I don't want to destroy it by name... (2 Replies)
I don't know enough about this subject but this is for the big guns...
Yesterday:-
Man accidentally 'deletes his entire company' with one line of bad code | News | Lifestyle | The Independent (5 Replies)
Hello,
I have a log file as shown below. Each line starts with instance nr.
: Session: IP Processing HTTP Socket Command
: Connecting User-Agent Media:
: NOT Rejected Media
: Session: Username Request Channel
: Username : Check if he is in User Database
: Username : not in the... (6 Replies)
Hello friends , yesterday i used plop boot manager to shutdown the pc but after
using it, nothing happened on screen , i mean cpu is running but monitor show blank screen and then i reassembled the whole pc again ,cleaned , reattach all the devices again but problem persist .
Any help (0 Replies)
I messed up my pool by doing zfs send...recive So I got the following :
zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
rpool 928G 17.3G 911G 1% 1.00x ONLINE -
tank1 928G 35.8G 892G 3% 1.00x ONLINE -
So I have "tank1" pool.
zfs get all... (8 Replies)
Inspite of my best efforts, eclipse 3.5 seems to continue to misbehave and insert tab characters in my source code.
How do I write a script execute from emacs to search all my files for tab characters and conveniently position me on the line of code that has the offending tab?
Here are my... (7 Replies)
After a few hours of frustration because I didn't understand why my symlinks are destroyed i just found out that sed -i will destroy symlinks.
I searched but i didn't found any good solution for this.
Is there any way to overcome this ? On my ubuntu server sed version is 4.1.5
edit: Sorry... (0 Replies)
Hi,
I have problem creating hardware raid on T5120 with 4 disks. After the hardware raid 1 created, then I used the raidctl -l c1t0d0 and raidctl -l c1t2d0
the output of volume c1t0d0 contain disk 0.0.0 0.1.0, also the volume c1t2d0 contain disk 0.0.0 0.1.0 and should be 0.2.0 0.3.0
so I... (15 Replies)
I am going to install Linux/Debian on my computer.
My current OS is windows 98.
My question is that if I install Linux, it is required to partition the hard drive.
Windows may be destroyed. I still want to keep it. I have no windows installtion CD. I don't want to buy it.
Can I avoid... (1 Reply)
What is a good way to find an entry in a .conf file and then remove all lines associated with that entry?
I have a Samba server running on Linux that I would like to easily add/remove share entries in the smb.conf file without removing or deleting lines that are not associated with that section.... (5 Replies)