read $_ -aa $[x=x?d%(d=x):a[i++]]{0..999} for x in ${a[@]} { printf $s$[x/d] s=: }