Skip to content

Instantly share code, notes, and snippets.

@andreyshuster
Last active February 20, 2019 14:09
Show Gist options
  • Save andreyshuster/ea5e79d06ff6e36680f2608306b4b2be to your computer and use it in GitHub Desktop.
Save andreyshuster/ea5e79d06ff6e36680f2608306b4b2be to your computer and use it in GitHub Desktop.
top ten shell commands
#!/usr/bin/env sh
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 -n 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment