<br><br><div class="gmail_quote">On 10 December 2010 03:11, Amadeus W.M. <span dir="ltr">&lt;<a href="mailto:amadeus84@verizon.net">amadeus84@verizon.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I have a binary file with data. Each block of 48 bytes is a record. I<br>
want to extract the first 8 bytes within each record. I&#39;m thinking this<br>
should be possible with dd, but gawk, perl - anything goes. It just has<br>
to be fast, because the data files are ~ 1Gb.<br>
<br>
I can do this in C++ but I was just wondering if it can be done with<br>
existing well tested tools.<br>
<br>
Any suggestions? Thanks!<br>
<br></blockquote><div><br>perl or python.<br><br>In perl you want &quot;unpack&quot; and in python you probaly want &quot;struct.unpack&quot;.<br><br>jch<br></div></div>