101325__/tex/hexout101325.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)
y=(13 6 11 2 5 4 10 3 7 7 1 15 11 5 9 15 1 15 4 4 9 13 5 11 11 11 11 4 2 2 14 1 6 4 7 13 6 6 13 12 4 8 8 14 12 13 11 3 12 11 8 12 12 6 11 9 13 3 14 10 13 10 2 13)

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

echo ""
echo ""

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

echo ""
echo ""