The prettified JSON string already contains a newline so don't print another one. This allows to pipe the json output (in conjunction with the --quiet option) to files without having to truncate them afterwards. --- tools/virsh-domain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 6c1bc2f..ff71193 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -8975,6 +8975,7 @@ cmdQemuMonitorCommand(vshControl *ctl, const vshCmd *cmd) if (pretty && (tmp = virJSONValueToString(pretty, true))) { VIR_FREE(result); result = tmp; + virTrimSpaces(result, NULL); } else { vshResetLibvirtError(); } -- 2.9.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list