title: recursive grep using python
body: <p>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>
  
  <pre><code>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()
  </code></pre>
  
  <p>Can some one pls tell me how to fix this to do what it is supposed to?</p>