mapfile a eval '(declare -A b for s in ${a[@]// /_};{ b[${s:'{0..132}':1}]+=1 } for k in ${!b[@]};{ printf %.0${b[$k]:8:1}s "${k/_/ }" }) '