I'm turning a bash script into python, but when do this in python:
cmd = r"grep 'name' somefile.log | grep -v 'result=""' | grep -v result='is\ OK'"
results_str = os.system(cmd)
print (results_str,"\n")
I don't get any output of grep. If I run it from the command line/bash, I get
grep 'name' somefile.log | grep -v 'result=""' | grep -v result='is\ OK'
name="blah", result="the thing I'm trying to grep", action="", info=""
What is wrong with my python grep?