Skip to content

Instantly share code, notes, and snippets.

@paulmars
Created March 30, 2010 23:16
Show Gist options
  • Save paulmars/349729 to your computer and use it in GitHub Desktop.
Save paulmars/349729 to your computer and use it in GitHub Desktop.
See which commands in your bash history you execute the most
irb
require 'pp'; command = {}; `cat .bash_history`.split("\n").map{|x| x.split(" ").first }.each{|c| command[c] ||= 0; command[c] += 1 }; pp command.sort{|x,y| x[1] <=> y[1] }
@gdeglin
Copy link

gdeglin commented Mar 30, 2010

Neato!

@paulmars
Copy link
Author

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment