1
I am in need of generating a csv/txt file from a zone file on a named DNS server.
For examples I would like to generate a list of the hostname and IP from the zone file
From this
monkey A 192.168.1.1
bear A 192.168.1.2
shark A 192.168.2.1
bird A 192.168.3.1
lion A 192.168.4.1
To This
monkey,192.168.1.1
bear,192.168.1.2
shark,192.168.2.1
bird,192.168.3.1
lion,192.168.4.1
How can I achieve this, using Sed and Grep? Does anyone have a script that they use to do a similar task?
Brilliant, both examples using sed & awk worked great! Cheers. – SamCulley – 2013-05-28T07:45:14.497