while read -n1 c;{ a[c]+=$c;} IFS=;echo "${a[*]}"