K
Kali K E
Hi,
I wanted to grep a file for a pattern. The pattern is a dynamic one
stored in the string "rec". I tried to do it as follows:
cmd = "grep -c rec filelist2 > grepdata"
os.system(cmd)
But I find that the system is not referencing the contents of rec
data. There is no syntax error and also the grep itself does not crib.
Please suggest what is the correct method.
Thanks
I wanted to grep a file for a pattern. The pattern is a dynamic one
stored in the string "rec". I tried to do it as follows:
cmd = "grep -c rec filelist2 > grepdata"
os.system(cmd)
But I find that the system is not referencing the contents of rec
data. There is no syntax error and also the grep itself does not crib.
Please suggest what is the correct method.
Thanks