Here is the code I have question on
#!/bin/bash
declare -a data81
for ((i=1; i<=3; i++))
do
for ((j=1; j<=2; j++))
do
data81[$i, $j]=$i
printf "%4s" ${data81[$i, $j]}
printf "%4s\n" ${data81[1, 1]}
done
echo
done
The output is the following:
1 1
1 1
2 2
2 2
3 3
3 3
which is not what I wanted, because I used printf "%4s\n" ${data81[1, 1]}
, so the second column should be the same.