dd question

John Haxby john.haxby at gmail.com
Fri Dec 10 10:51:46 UTC 2010


On 10 December 2010 03:11, Amadeus W.M. <amadeus84 at verizon.net> wrote:

> I have a binary file with data. Each block of 48 bytes is a record. I
> want to extract the first 8 bytes within each record. I'm thinking this
> should be possible with dd, but gawk, perl - anything goes. It just has
> to be fast, because the data files are ~ 1Gb.
>
> I can do this in C++ but I was just wondering if it can be done with
> existing well tested tools.
>
> Any suggestions? Thanks!
>
>
perl or python.

In perl you want "unpack" and in python you probaly want "struct.unpack".

jch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20101210/18b6e114/attachment.html 


More information about the users mailing list