Yesterday I used uuencode and uudecode for the first time in ages. It worked!
Before I discovered that I had uudecode available, I tried to use xxd to encode and awk to decode.
But my awk one-liner did everything right except never outputting any zero bytes.
This was on BSD 2.11 on a PDP 11/84... it's a machine called snake and you can use it too, just go to
https://wiki.livingcomputers.org/doku.php
Anyhow, I successfully computed 100 digits of Pi using BBC Basic!
@EdS thank you for using "snake" at Living Computers!
older awk implementations
@EdS I find that fascinating, and I think we can all see where it came from.
older awk implementations
@EdS Well, now you've got Beeb BASIC there, how about VDU 0 - does that work?
older awk implementations
Now I have BBC Basic I'm no longer in need! (In fact, uudecode got me out of the hole.)
What I might have done is write the hex-to-binary in C, but of course awk was my first thought.
older awk implementations
This oneliner shows that older awks won't printf a zero byte... any way to make it do that?
awk 'BEGIN{printf("%c%c%c\n",65,0,66);exit}' | od -x
Tested on BSD 2.11 and SunOS 4.1.1 and Unix System V R3 (all at living computers)