[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



I figured Fletch would come through. :)

> 
> $ perl -le 'print "a" x 2048, "b" x 512, "\xff" x 16, "b" x 512' > foo
> $ perl -lne 'BEGIN{$/=\1024} print "hit byte ", ($.-1) * 1024 + $-[0] if /\xff{16}/' foo
> hit byte 2560
> $ perl -le 'print "a" x 2048, "b" x 1512, "\xff" x 16, "b" x 512' > foo
> $ perl -lne 'BEGIN{$/=\1024} print "hit byte ", ($.-1) * 1024 + $-[0] if /\xff{16}/' foo
> hit byte 3560
> 
> 


-- 
Until later, Geoffrey


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00735" href="msg00735.html">[ale] Binary Grep</a></strong>
<ul><li><em>From:</em> greg.freemyer at gmail.com (Greg Freemyer)</li></ul></li>
<li><strong><a name="00738" href="msg00738.html">[ale] Binary Grep</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
<li><strong><a name="00745" href="msg00745.html">[ale] Binary Grep</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00746.html">[ale] Three d[a]emonic questions</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00748.html">[ale] Mailing list manager with a search interface</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00745.html">[ale] Binary Grep</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00743.html">[ale] Binary Grep</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00747"><strong>Date</strong></a></li>
<li><a href="threads.html#00747"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>