sh/writebyte (325 bytes)
1 # also see the other direction: readbyte 2 writenum () { printf %b `printf \\\\%03o "$@"` ; } 3 # eg. writebytenum 65 66 67 0x0 0x20 4 5 # Cannot prepend a 0, must be <=3 digits 6 writeoctpedantic () { printf %b `printf \\\\%s "$@"` ; } 7 # Can prepend a 0 but slow 8 writeoctslow () { printf %b $(printf \\%03o $(printf 0%s\ "$@")) ; }