Nov-10-2017, 10:34 PM
(This post was last modified: Nov-10-2017, 11:44 PM by sparkz_alot.)
In my code, I’m trying to compare the output returned by the os.system(’/opt/abc/cmd/abc-target’)
Here’s my code:
import os
s= os.system(’/opt/abc/cmd/abc-target’)
if (s == ‘abc’ ):
print (‘great you found the target system’)
The above code doesn’t throw any error but doesn’t execute the if statement. I want the comparison to match and print success.
Please help me understand what I'm doing wrong.
Here’s my code:
import os
s= os.system(’/opt/abc/cmd/abc-target’)
if (s == ‘abc’ ):
print (‘great you found the target system’)
The above code doesn’t throw any error but doesn’t execute the if statement. I want the comparison to match and print success.
Please help me understand what I'm doing wrong.