Hacker News new | ask | show | jobs
by tummybug 2767 days ago
This doesn't look to take commands after a pipe into account so IMHO doesn't accurately reflect command usage. For example running above I was surprised awk wasn't in the list but when I went to investigate I found I almost always am piping something to awk.
1 comments

Hmm yeah. And often I type multiple commands separated by semicolons, which it bunches together as one. Also that and long paths meant mine was very unpretty. Speaking of AWK, this uses the same flawed method, looks nicer (for my history), and is shorter:

  history | awk '{a[$2]++} END{for (i in a) print a[i]"\t"i}' | sort -n | tail