]>
code.delx.au - monosys/blob - hacks/find-in-file
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
):]