$ history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn |head -n 10
124 hg
96 sudo
63 mc
20 ./full-update.sh
18 ./full-push.sh
17 php
13 mcedit
11 composer
11 cat
10 eix
$ history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn |head -n 10
124 hg
96 sudo
63 mc
20 ./full-update.sh
18 ./full-push.sh
17 php
13 mcedit
11 composer
11 cat
10 eix