read n for((;n>1;n-=n&1?++i,1:n/2)){ b+=abc ${b:i:1} s+=$_ t=$_$t } echo $s\a$t