declare -A c for((++b;b;)) { IFS=\$ read a b ((b=0x$b,c[$a]*=b))||{ c[$a]=$b;d[e++]=$a;} } for a in "${d[@]}" { printf "$a\$%x " ${c[$a]} }
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page