From: SBP <se...@ik...> - 2025-05-31 02:29:44
|
Hi, I've developed and extension called "binrecord" to process binary data files in GAWK, and I'd like to share it with you all! I've wanted to be able to do this for a long time, and now I finally got the time to look into it and make it happen. The code is available at https://gitlab.com/seirios/binrecord under the GPLv3. It is technically a gawkextlib extension. Essentially, if you want to process a binary data file "data.bin" consisting of records with, say, a uint32 index and three float coordinates, all in little-endian byte order, you can simply do (using the included `bawk' command): $ bawk '%u32le 3%f32le' '{ print $2,$3,$4 }' data.bin You can find all the information about the extension in the README. Hope you like this, as I do :) Cheers! Sirio |