Can someone please assist me with what i am doing wrong here?
root@localhost:$ cat Names
This is Paul
from subprocess import *
test = check_output("grep Paul Names", stderr=STDOUT, shell=True )
if test is True :
root@localhost:$ python find.py
is is an identity operator, so it is not performing the comparison you think it is. It compares to see if you are pointing to the same object.
Your check should simply be: