Running Ubuntu 24.04 LTS if it makes a difference.
I am trying to output the result of two commands in a bash script (output is to stdout) on a single line, but I cannot seem to get it to work - I get the two outputs on two lines.
The command I have tried (and many variations thereof) is:
ssh [email protected] -- 'echo -n "VMName : " && lsblk | grep -i disk' && 'echo -n " Hypervisor = HypervisorHostName"'
This outputs on two lines like this:
VMName : vda 254:0 0 20G 0 disk
Hypervisor = HypervisorHostName
whereas I would like to get:
VMName : vda 254:0 0 20G 0 disk Hypervisor = HypervisorHostName
I suspect it is trivially easy. Am I am missing the obvious here?
Thanks,
Alan.