Hi all,
I was trying to find a thread to post my questions about script but it was a bit confusing.
Sorry if I am posting here.
I am running a Dynamic DNS and want to write a script that every time I use nsupdate (in another scrip that I already wrote) it put the content of DNS data base in a diffreent file:
example:
my zone file is
but in my text file I just want have
What should I do. I am not familiar with command, grep, cut....
Please help.
Thanks in advance.
Roxanne
P.S. all numbers are pretended.
I was trying to find a thread to post my questions about script but it was a bit confusing.
Sorry if I am posting here.
I am running a Dynamic DNS and want to write a script that every time I use nsupdate (in another scrip that I already wrote) it put the content of DNS data base in a diffreent file:
example:
my zone file is
Code:
$ORIGIN .
$TTL 86400 ; 1 day
foo306 IN SOA ns1.foo306. admin.foo306. (
2008070104 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
86400 ; minimum (1 day)
)
NS ns1.foo306.
MX 1 ns1.foo306.
$ORIGIN het306.
$TTL 600 ; 10 minutes
dynamicdns A 6.6.6.6
$TTL 86400 ; 1 day
localhost A 127.0.0.1
ns1 A 4.4.4.4
roxanne A 5.5.5.5
$TTL 600 ; 10 minutes
roxy A 2.2.2.2
A 3.3.3.3
but in my text file I just want have
Code:
dynamicdns 6.6.6.6
localhost 127.0.0.1
ns1 4.4.4.4
roxanne 5.5.5.5
roxy 2.2.2.2
3.3.3.3
What should I do. I am not familiar with command, grep, cut....
Please help.
Thanks in advance.
Roxanne
P.S. all numbers are pretended.