3 ms·
Not the main point, and this is a very cool dancing bear. But, on this point: "since none of the awks can read binary, you first need to pipe the classfile th
by tyingq 6y ago
Not the main point, and this is a very cool dancing bear. But, on this point:
"since none of the awks can read binary, you first need to pipe the classfile through hexdump"
Gawk works fine with binary files for me. Using FIELDWIDTHS for fixed length records or the readfile() extension to slurp in a whole file works fine. The readline() function can also be paired with FIELDWIDTHS to read a fixed number of bytes. Newline separated records with nulls in them also read as expected. I'm curious what problems the author saw with binary and gawk.
- rethab 6y agoI actually simply didn't know it was possible based on some googling. But thanks for hint. Someone also opened an issue on github giving me a hint on how to replace hexdump[0]. I'll definitely give this a try :) 0. https://github.com/rethab/awk-jvm/issues/1 https://github.com/rethab/awk-jvm/issues/1