I am using the subprocess module to run a find & grep command with two different variables. I have a syntax error but I just don't see it.
With one variable, it runs just fine:
path = "src"
path_f = "TC"
subprocess.Popen('find /dir1/tag/common/dir2/dir3 /dir1/tag/common/dir2/dir3/dir4/ -iname "%s"'%path, shell=True)
Two variables:
subprocess.Popen('find /dir1/tag/common/dir2/dir3 /dir1/tag/common/dir2/dir3/dir4/ -iname "%s"* | grep "%s" > fileList.txt'%path, %path_f, shell=True)
Can someone help ?
Thanks.