Bash ~ Perl ~ Python ~ Batch ~ Ruby
Sunday, 18 August 2013
grepping a word in a file using python class
f1=open("/etc/passwd","r")
class sam:
def sam1(self,m):
for i in f1.readlines():
if m in i:
print i
v=sam()
v.sam1("bash")
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment