]>
code.delx.au - monosys/blob - bin/find-in-file
3f80250c38c15e0fc3260c97fd0c0924217871d7
9 print >>sys
.stderr
, "Usage: %s needle haystack" % sys
.argv
[0]
22 newbuf
= f
.read(chunk_size
)
28 print "found", count
+ pos
29 count
+= len(buf
) - len(magic
)
30 buf
= buf
[-len(magic
):]