Hi,
We just added libunbound with unbound-host to our project, cross-compiled using Buildroot. Thanks for the excellent unbound project.
It would be nice if unbound-host had a -s option to limit output to just the result, as "+short" does with 'dig'. Has this been requested before ?
For example, we are querying for a CNAME, currently...
cname="$(unbound-host -t CNAME "$host" | sed -n -r -e 's/^.* CNAME .* ([^ ]+)$/\1/p')"
But, this would be better...
cname="$(unbound-host -s -t CNAME "$host")"
Additionally, on an error no standard output should be generated, which makes this suggestion more than a couple line patch.
Possibly option -s would call short_output() instead of pretty_output() ? Or just add to pretty_output() ?
To be clear: