@madpilot makes

Bash history – a geek meme

I was browsing through some ruby blogs and came across this crazy memeshell command history distributions.

By running the following command in bash (zsh needs a -n 1000 after history apparently)

history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s \n",a[i],i}}'|sort -rn|head

and you’ll get the top ten most used shell commands. Mine are:

259 ENV=test
45 cd
36 vi
36 ls
34 svn
18 script/spec
12 rake
9 fg
8 cap
7 script/generate

I’ve obviously been doing a lot of testing on a project I’m working on (Alas, it’s PHP). Most of the other calls are pretty rails centric though :)

I wouldn’t mind seeing what the rest of the Perth Ruby developer’s histories look like :)