In reply to fREW Schmidt's and Ovid's top 10 history commands, here is my list:
fw@hal2 ~
:) % history -n 1 | awk {'print $1'} | sort | uniq -c | sort -k1 -rn | head
13299 cd
7846 ls
7126 perl
5755 vim
3117 git
2893 sudo
1319 exit
1134 lt
977 rm
817 perldoc
alias lt='ls -ltr'
(this is from my eternal zsh history which started on Nov 4th, 2008)
-- Frank
my %words;
$*IN.lines.split(/\s+/).map: { %words{$_}++ };
for %words.pairs.sort: { $^b.value <=> $^a.value } -> $pair {
say $pair
}
see also: this node at perlmonks