Created
July 26, 2017 02:35
-
-
Save laixintao/03a165b3d516f1d5240858a228313215 to your computer and use it in GitHub Desktop.
To see your most used shell command.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 -n20 | |
1 1758 30.5208% git | |
2 624 10.8333% cd | |
3 557 9.67014% vim | |
4 305 5.29514% ls | |
5 256 4.44444% workon | |
6 200 3.47222% honcho | |
7 186 3.22917% python | |
8 158 2.74306% pip | |
9 91 1.57986% mongo | |
10 88 1.52778% tmux | |
11 83 1.44097% clear | |
12 76 1.31944% exit | |
13 72 1.25% pytest | |
14 70 1.21528% brew | |
15 58 1.00694% rm | |
16 53 0.920139% cat | |
17 52 0.902778% source | |
18 50 0.868056% ipython | |
19 46 0.798611% curl | |
20 38 0.659722% which |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment