ayi Dig will aussi do it assez nicely: dig -t txt example.com et si you add le +short option you get juste le txt record in quote marks avec no autre cruft.