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 =
Maybe an example can help you, the command find . -print | grep "python" is equivalent to this:
import subprocess
pc1 = subprocess.Popen('find . -print', stdout=subprocess.PIPE, shell=True)
pc2 = subprocess.Popen('grep "python"', stdin=pc1.stdout, shell=True,
stdout=subprocess.PIPE)
print pc2.communicate()[0]