read while read s c do((--a[_$s],++a[_$s=c+1])) done echo $[a[{1..8}]]' '