110825_/tex/hexout.sh

#!/bin/bash

# (c) david vajda
# 10/13/25
# hextransform matrix

x=(4 10 13 6 4 12 5 6 6 12 15 5 2 2 6 7 8 3 8 4 14 10 1 11 4 6 11 5 10 4 11 10 3 8 6 2 4 12 7 10 9 13 3 12 3 5 11 9 13 15 10 8 9 7 1 2 10 4 15 4 6 15 14 4)

echo -n "0x"
i=0
while [ $i -lt 64 ]
do
    printf "%x" ${x[$i]}
    i=$(($i+1))
    if [ $(($i % 4)) -eq 0 ]
    then
        echo -n ", 0x"
    fi
done