Created
December 23, 2023 15:21
-
-
Save encoreshao/11add45a830b11b019d9fc61622f3d87 to your computer and use it in GitHub Desktop.
Statistic of the frequnce of your command from your history
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 \"% \"; }' | grep -v './' | column -c3 -s ' ' -t | sort -nr | nl | head -n10 | |
history | awk '{CMD[$2]++;count++;} END { for (a in CMD )print CMD[a] " " CMD[a]/count*100 "% " a }' | sort -nr | nl | column -t | head -n 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment