Skip to content

Instantly share code, notes, and snippets.

@mickeypash
Created January 30, 2015 19:03
Show Gist options
  • Save mickeypash/992bd2ddf4784de2aae6 to your computer and use it in GitHub Desktop.
Save mickeypash/992bd2ddf4784de2aae6 to your computer and use it in GitHub Desktop.
Self explanatory
#!/bin/sh
#
# Displays your top 10 most used commands
#
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment