コマンドの実行回数

ふと、現実逃避にzsh-history からコマンドの実行回数を出すワンライナーを叩いてみた。

gotoken% wc -l .zsh-history
  101848 .zsh-history
gotoken% cat .zsh-history|awk 'BEGIN {FS=";"} {print $2}'|awk '{print $1}'|sort|uniq -c|sort -nr|head
14554 ls
13000 fg
11606 ruby
7910 cd
6673 pwd
4433 lv
3820 grep
3047 find
2888 sudo
2751 diff
gotoken%

パイプのあととか xargs の中身とか考え出すと、zshのパーザがないと出来ないのかも。