in reply to Re^4: Possible faster way to do this?
in thread Possible faster way to do this?

i think the benefits of using Perl will be apparent later when you expand your pipeline. However, just for trying out ideas, there is also awk which does what cut does and more and also has hashmaps (associative arrays), so:

Edit: N=1 specifies to use first column of input

awk -vN=1 '{if($N in uniq){uniq[$N]++}else{uniq[$N]++}}END{for(k in un +iq){print k," => ",uniq[k]}}'