Jul-19-2019, 03:59 PM
shlex.split()is not the function I have written. I removed that function from my script. This is how the line looks now.
cmd = list2cmdline("find /OVS -wholename '*VirtualMachines/*/vm.cfg' -exec grep -H 'simple_' {} \; 2>/dev/null | aw k {'print $3'} | tr -d \"'\"")This is the output I get now.
Error:python test.py
ssh succuessful. Closing connection
Connection closed
[]
f i n d " " / O V S " " - w h o l e n a m e " " ' * V i r t u a l M a c h i n e s / * / v m . c f g ' " " - e x e c " " g r e p " " - H " " ' s i m p l e _ ' " " { } " " \ ; " " 2 > / d e v / n u l l " " | " " a w k " " { ' p r i n t " " $ 3 ' } " " | " " t r " " - d " " \" ' \"
There was no output for this command