0

When querying for a TXT DNS record that contains a semicolon (;) using both dig and nslookup version 9.8.3-P1, its output of the text record is in double quoted output format:

Non-authoritative answer:
host._domainkey.domain.tld  text = "v=DKIM1\;k=rsa\;p=MIGf...IDAQAB\;"

Why dig does show the ; as \; is explained at the FreeBSD mailing list in 2008.

Somewhere between 9.8 and 9.9 versions semicolons in quoted text are not escaped any longer.

I don't want to upgrading Mac OS X 10.9. Installing a package with brew as an option.

How can I unescape the double quoted output from dig and/or nslookup answers permanently without having to change my query command?

1
dig txt domain.example.com | sed 's/\\;/;/g

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.