[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Wed Nov 17 05:47:04 2004 -->
- <!--x-from-r13: rfbgrevp ng 3gvzrf25.arg (Urbsserl) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] Binary Grep -->
- <li><em>date</em>: Wed Nov 17 05:47:04 2004</li>
- <li><em>from</em>: esoteric at 3times25.net (Geoffrey)</li>
- <li><em>in-reply-to</em>: <<a href="msg00745.html">[email protected]</a>></li>
- <li><em>references</em>: <<a href="msg00735.html">[email protected]</a>> <<a href="msg00738.html">[email protected]</a>> <<a href="msg00745.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] Binary Grep</li>
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>