Sponsored Content
Top Forums Shell Programming and Scripting Parse "masters" ip from named.conf Post 302185449 by era on Tuesday 15th of April 2008 03:29:07 AM
Old 04-15-2008
Quote:
Originally Posted by Citricut
I want to parse, given a zone name, the IP addres in "masters { }" for that zone.
The closest I've got is
Code:
nawk '/zone "180.20.10.in-addr.arpa"/,/[000-999].[000-999].*;/' /opt/bind/etc/named.conf

but it stops in the "allow-notify" line. I can't use "};" regexp neigther because is also stops in the allow-notify.
Any idea will be welcome Smilie
If the file always has the final "};" at start of line, you can match that.

Code:
nawk '/zone "180.20.10.in-addr.arpa"/,/^};/{ if ($0 !~ /[^ .0-9;]/) print }' /opt/bind/etc/named.conf

Trimming the trailing semicolon still left as an exercise.
 

9 More Discussions You Might Find Interesting

1. Solaris

Directory named "~" that points to root

I don't know how this got here, but in a directory on one of my servers I see a directory named ~ that points to root. Has anyone ever seen anything like this before. I'm affraid to delete it in case it wipes out everything on root. - HELP:eek: (1 Reply)
Discussion started by: jskillet
1 Replies

2. UNIX for Dummies Questions & Answers

directory named "-filedir"

How do you delete a directory named -filedir? (2 Replies)
Discussion started by: jskillet
2 Replies

3. UNIX for Dummies Questions & Answers

Unix masters please help newbie on "find" command

please help me figure out how to do this I wont lie, this is for a homework problem and I have searched on google for a long time and still can't figure out what to do. here is the problem So there's a folder let's say called "bare" in it, there are 10 dirs with names from "part1" through... (2 Replies)
Discussion started by: white_raven0
2 Replies

4. UNIX for Advanced & Expert Users

The "PS" command was displaying*terminals named as "SYSCON"

Hi, When typing the command ps -fe.the system is showing a process called SYSCON:confused:.... I am not sure what process is that.I hava a script that kills all command staring with 'sys' but i don't want to kill syscon:( since i think it is some system process:confused: .Please help me to find... (1 Reply)
Discussion started by: kiranjose85
1 Replies

5. UNIX for Advanced & Expert Users

separate "named daemon" message from /var/adm/messages

Hello group, How can I separate "named daemon" messages to the other file instead of /var/adm/messages. I still want all other daemons log the messages to /var/adm/messages. i.e. named => /var/adm/named.message other daemons => /var/adm/messages. I searched unix.com, and google but I still... (5 Replies)
Discussion started by: dannytrinh
5 Replies

6. Red Hat

How to delete a file named "~" ???

When i 'ls' the bin folder, there was "~" tilde in the list. How to delete this safely as this symbol represents home folder. Kindly help. (1 Reply)
Discussion started by: frozensmilz
1 Replies

7. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

8. Solaris

Changing "rx_queue_number" in "ixgbe.conf". Reboot or Network Restart?

Hi all, First post here. Working on Solaris 10, on a Sun t4-4, need to change RX queue depth(ethernet, not HBA) and was wondering if i could get by with just restarting the network or if i should just bounce the whole shebang. Apologies if i missed a similar thread. if there is one, please... (2 Replies)
Discussion started by: caspnx
2 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
nsd-patch(8)							    nsd 3.2.12							      nsd-patch(8)

NAME
nsd-patch - NSD zone patcher version 3.2.12. SYNOPSIS
nsd-patch [-c configfile] [-f] [-h] [-l] [-o dbfile] [-s] [-x difffile] DESCRIPTION
Nsd-patch is the zone patcher for nsd(8). It reads in the nsd database (nsd.db) and difffile (ixfr.db), and overwrites the zone text files if they have been updated. Running this regularly ensures that the difffile does not grow infinitely. OPTIONS
-c configfile Read specified configfile instead of the default /etc/nsd3/nsd.conf. -f Forces writing zone files. Also zones that have not changed are written back to their zone files. -h Print usage help information and exit. -l List the journal entries from the difffile. Does not write to zone files. -o dbfile Store the output directly to dbfile. -s Skip writing zone files. No zones are written back to their zone files. -x difffile Read specified difffile. Overrides the config file setting. FILES
/var/lib/nsd3/nsd.db default NSD database /etc/nsd3/nsd.conf default NSD configuration file SEE ALSO
nsd(8), nsdc(8), nsd.conf(5), nsd-checkconf(8), nsd-notify(8), nsd-xfer(8), zonec(8) AUTHORS
NSD was written by NLnet Labs and RIPE NCC joint team. Please see CREDITS file in the distribution for further details. NLnet Labs jul 19, 2012 nsd-patch(8)
All times are GMT -4. The time now is 02:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy