I'm testing my shell script and python script together, so I write a shell script to call these two script in loop like this:
while ((1)) ; do
/usr/local/bin/ovs-appctl dpdk/vhost-list
sleep 10
/usr/local/bin/ovs-appctl dpdk/virtio-net-show n-f879ac2f
sleep 10
/usr/local/bin/ovs-appctl dpdk/virtio-net-show n-434ab558
sleep 10
/usr/local/bin/ovs-appctl dpdk/virtio-net-show i-brpri-p
sleep 10
`sh ./env_check`
`cat output.txt`
sleep 10
`python vm_qga_tool /opt/cloud/workspace/servers/6608da87-e374-4796-adb1-8faa29f49e9a/qga.sock connect:172.16.0.1`
sleep 10
done
but the result report error:
test-dpdk-virtio-net-show.sh: line 13: Checking: command not found
test-dpdk-virtio-net-show.sh: line 15: {"session":: command not found
Line13 is cat output.txt
, line15 is python vm_qga_tool ...
.
the output.txt is the result of line12 sh ./env_check
, and the output of vm_qga_tool
is like this:
{"session"...
so how to fix this? How to cat result of the shell script in shell script?