linickx/rsdns — pull request #5 by fyfe (2011-12-25 17:38:57+00:00)
Title: Fix and improve the output of rsdns-list.sh

Fix the output of MX and TXT records.

Output the domain and records list as a table.

The domains table is sorted by domain name, and the records table
is sorted by type then by name.

Signed-off-by: Andrew Fyfe

Before MX and TXT records weren't parsed correctly and all name fields begin with a ":

```
A-xxxxxx - A - "example.net - xxx.xxx.xxx.xxx
NS-xxxxxx - NS - "example.net - dns1.stabletransit.com
NS-xxxxxx - NS - "example.net - dns2.stabletransit.com
MX-xxxxxx - priority":10 - "example.net - MX
TXT-xxxxxx - TXT - "example.net - v=spf1
mx - - -
a:example.net - - -
2011-12-18T15:38:33.000+0000 - ttl":86400 - -all - 2011-12-18T15:38:33.000+0000"
TXT-xxxxxx - TXT - "example.net - spf2.0/pra
AAAA-xxxx - AAAA - "example.net - xxxx::xxxx:xxxx:xxxx:xxxx
```

With this patch it now looks like this:

```
Record ID Type Name Data
AAAA-xxxx AAAA example.net xxxx::xxxx:xxxx:xxxx:xxxx
A-xxxxxx A example.net xxx.xxx.xxx.xxx
MX-xxxxxx MX example.net priority:10 example.net
NS-xxxxxx NS example.net dns1.stabletransit.com
NS-xxxxxx NS example.net dns2.stabletransit.com
TXT-xxxxxx TXT example.net v=spf1 mx a:example.net -all
TXT-xxxxxx TXT example.net spf2.0/pra
```