I am new to python and trying to learn. I am trying to implement a simple recursive grep using python for processing and here is what I came to so far.
p = subprocess.Popen('find . -name [ch]', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
for line in p.stdout.readlines():
q = subprocess.Popen('grep searchstring %s', line, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
print q.stdout.readlines()
Can some one pls tell me how to fix this to do what it is supposed to?
foryour problem or a typo? - J.J.