Jul-18-2019, 03:19 AM
thanks I tried to change command as you suggested.
When I run python I do not get any errors. But the output is not shown.
printing the command via python I see that the command is as follows:
find /OVS -wholename *VirtualMachines/*/vm.cfg -exec grep -H simple_ {} ; 2>/dev/null | awk "{print $3}" | tr -d '
Original command is below
find /OVS -wholename '*VirtualMachines/*/vm.cfg' -exec grep -H 'simple_' {} \; 2>/dev/null | awk {'print $3'} | tr -d "'"
As we can see the \ is removing the double quotes. Without double quotes above command will not work.
Is there a way we can modify the command so that it is parsed correctly by Python and executed on remote server?
When I run python I do not get any errors. But the output is not shown.
printing the command via python I see that the command is as follows:
find /OVS -wholename *VirtualMachines/*/vm.cfg -exec grep -H simple_ {} ; 2>/dev/null | awk "{print $3}" | tr -d '
Original command is below
find /OVS -wholename '*VirtualMachines/*/vm.cfg' -exec grep -H 'simple_' {} \; 2>/dev/null | awk {'print $3'} | tr -d "'"
As we can see the \ is removing the double quotes. Without double quotes above command will not work.
Is there a way we can modify the command so that it is parsed correctly by Python and executed on remote server?