Hello.
On 10/13/20 1:40 AM, pioruns2019(a)gmx.com wrote:
How can I have output these commands in shell script?
It comes over the socket... so you can read it, but we recommend tojson
for scripts, e.g.:
output="$(echo "tojson(cache.stats())" | socat -
/run/knot-resolver/control/1)"
There's the inconvenience of "> " occurrences meant for interactive use
of the control socket, but it shouldn't be too hard to trim in the script.
--Vladimir