am trying to pretty print following existing solution
https://stackoverflow.com/questions/17692771/awk-sort-multidimensional-array/17706399#17706399
awk 'BEGIN {
a[1][1] = "UP-H"
a[1][2] = "RRR8"
a[1][3] = "85554"
a[1][4] = "H55"
a[2][1] = "MM"
a[2][2] = "454"
a[2][3] = "X222"
a[2][4] = "X77a"
for (i=1; i in a; i++)
for (j=1; j in a[i]; j++)
printf "a[%d][%d] = %s\n",i,j,a[i][j]}'
will print
a[1][1] = UP-H
a[1][2] = RRR8
a[1][3] = 85554
a[1][4] = H55
a[2][1] = MM
a[2][2] = 454
a[2][3] = X222
a[2][4] = X77a
...
a[3][0] = asdf ...
....
but how loop over that array in order to pretty print that array along with generated/added text as below format
TEXT1 UP-H TEXT2 RRR8 TEXT3 85554 TEXT4 H55
TEXT1 MM TEXT2 454 TEXT3 X222 TEXT4 X77a
i dont know what is best way if i have let say e.g. array "a" with multiple values UP-H,RRR8,85554,H55