Skip to content

Instantly share code, notes, and snippets.

@mattpascoe
mattpascoe / tinydnsparse.awk
Created November 6, 2012 18:02
An AWK script to parse a tinydns data file into a CSV for later use by a dcm.pl script to load into opennetadmin
#!/usr/bin/awk -f
#
# Author: Matt Pascoe - matt@opennetadmin.com
#
# This awk script is used to extract relevant information from a tinydns data
# config file and build a csv with appropriate fields for passing into
# a dcm.pl module. This can be used to bootstrap a new database from existing
# site data.
#
# This script assumes the data to be reasonably correct as it is expected that
@mattpascoe
mattpascoe / bindparse.awk
Created August 29, 2022 21:09
Parse bind zone files to produce dcm.pl output.
#!/usr/bin/awk -f
#
# Author: Matt Pascoe - matt@opennetadmin.com
#
# This awk script is used to extract relevant information from a bind zone
# file and build the appropriate fields for passing into
# a dcm.pl module. This can be used to bootstrap a new database from existing
# site data.
#
# You can simply cat a file and pipe it to this script
@mattpascoe
mattpascoe / dhcpparse.awk
Last active April 2, 2024 08:18
An AWK script to parse ISC dhcpd configuration files into dcm.pl output to load into OpenNetAdmin
#!/usr/bin/awk -f
#
# Author: Matt Pascoe - matt@opennetadmin.com
#
# This awk script is used to extract relavant information from a dhcpd.conf
# config file and build dcm.pl output with appropriate fields. This can be
# used to bootstrap a new database from existing site data.
# As usual, inspect the output for accuracy.
# Also you will get three types of output, subnet,pool,host. You must
# add the subnet information first, then pool, then host.