awk 'x=$1{for(y=$2;x<y?y-=x:x-=y;)for(j=y;i||j--&&i=x;)A[j,i--]++;while(l||$2--&&l=$1+1)printf--l?"%c":RS,A[$2,l]+97}' FS=,
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page